apply plugin: 'com.android.library' android { compileSdkVersion 26 buildToolsVersion "26.0.2" defaultConfig { minSdkVersion 16 targetSdkVersion 26 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" consumerProguardFiles "consumer-rules.pro" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } aaptOptions { noCompress "tflite" //表示不让aapt压缩的文件后缀//相关文档https://blog.csdn.net/aiynmimi/article/details/89188874 } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } } dependencies { implementation fileTree(dir: "libs", include: ["*.jar"]) implementation 'com.android.support:appcompat-v7:27.1.1' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' implementation 'org.slf4j:slf4j-api:1.7.25' implementation 'org.tensorflow:tensorflow-lite:2.0.0' implementation 'com.github.tony19:logback-android:2.0.0' }