在proguard-rules.pro中添加以下代码:
-keepattributes EnclosingMetho
build.gradle的编译配置如下:
apply plugin: ‘com.android.application‘ android { compileSdkVersion 23 buildToolsVersion "23.0.3" defaultConfig { applicationId "com.app.aib" minSdkVersion 15 targetSdkVersion 23 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile(‘proguard-android.txt‘), ‘proguard-rules.pro‘ } } } dependencies { compile fileTree(include: [‘*.jar‘], dir: ‘libs‘) testCompile ‘junit:junit:4.12‘ compile ‘com.android.support:appcompat-v7:23.4.0‘ }
时间: 2024-11-08 10:54:03