原因:檢查build.gradle文件中buildtypes/debug 是否打開了混淆
Android gradle的buildTypes內(nèi)部配置
buildTypes {
????debug {
????????// 服務(wù)器配置
????????buildConfigField "String", "SERVERHEAD", "\"http://110.11.11.00/miaomiao/\""
????????//是否混淆 minifyEnabled false
????????zipAlignEnabled true
????????shrinkResources false
????????proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
????????signingConfig signingConfigs.debug
????}
????release {
????// 正式服務(wù)器
????buildConfigField "String", "SERVERHEAD", "\"http://miaomiao.com/miaomiao/\""
????//混淆
????minifyEnabled true
????zipAlignEnabled true//內(nèi)存對齊
????// 移除無用的resource文件
????shrinkResources true
????proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
????//簽名 signingConfig signingConfigs.release
????}
}