小编nay*_*hoj的帖子

如何使用androidOptions for android库项目

我在android studio中有一个应用程序代码,我想将它转换为库项目,以便我可以在其他应用程序中将其用作库.
库项目的build.gradle如下

apply plugin: 'com.android.library'
apply plugin: 'com.google.gms.google-services'
android {
    compileSdkVersion 24
buildToolsVersion "24.0.3"
defaultConfig {
    //applicationId "com.example"
    minSdkVersion 16
    targetSdkVersion 24
    versionCode 1
    versionName "1.0"

    jackOptions {
        enabled true
    }
    multiDexEnabled true
}
dexOptions {

    javaMaxHeapSize "4g"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }

 }
 }

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
})
testCompile 'junit:junit:4.12'

/* support libraries*/
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'com.android.support:design:23.1.0'
compile 'com.android.support:recyclerview-v7:23.1.0'
compile 'com.android.support:support-v4:23.1.0' …
Run Code Online (Sandbox Code Playgroud)

android java-8 android-studio-2.1

5
推荐指数
1
解决办法
1791
查看次数

标签 统计

android ×1

android-studio-2.1 ×1

java-8 ×1