【发布时间】:2017-04-13 02:56:53
【问题描述】:
我正在尝试从 android studio 部署 signed apk。我已经使用所需的凭据配置了 build.gradle,但是当我尝试构建 .apk 时出现了一些警告。我尝试在 proguard 规则中添加一些命令,但仍然收到相同的警告。我该如何解决这个问题?
这是问题的图片。
这是 gradles 文件。
apply plugin: 'com.android.application'
apply plugin: 'android-apt'
apply plugin: 'com.neenbedankt.android-apt'
//apply plugin: 'com.google.gms.google-services'
android {
signingConfigs {
release {
keyAlias 'something'
keyPassword 'something'
storeFile file('D:/something')
storePassword 'something'
}
}
compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig {
applicationId "com.aam.skillschool"
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}
configurations.all {
resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.google.apis:google-api-services-youtube:v3-rev179-1.22.0'
compile 'com.android.support:appcompat-v7:25.0.0'
compile 'com.android.support:support-v4:25.0.0'
compile 'com.jakewharton:butterknife:8.4.0'
compile 'com.android.volley:volley:1.0.0'
compile 'com.facebook.android:facebook-android-sdk:4.+'
compile 'com.jakewharton.timber:timber:4.3.1'
compile 'org.greenrobot:eventbus:3.0.0'
compile 'com.android.support:design:25.0.0'
compile 'com.google.code.gson:gson:2.8.0'
testCompile 'junit:junit:4.12'
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5'
apt 'com.jakewharton:butterknife-compiler:8.4.0'
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.5'
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.5'
apt 'com.google.dagger:dagger-compiler:2.7'
compile 'com.google.dagger:dagger:2.7'
provided 'javax.annotation:jsr250-api:1.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'br.com.mauker.materialsearchview:materialsearchview:1.2.0'
compile 'com.google.http-client:google-http-client-android:+'
compile 'com.google.api-client:google-api-client-android:+'
compile 'com.google.api-client:google-api-client-gson:+'
}
提前致谢!
【问题讨论】:
-
您是否在任何地方使用“GoogleAuthUtil”?它现在已被弃用。同时使用
useLibrary 'org.apache.http.legacy'来摆脱http 问题。 -
我没有在任何地方使用 GoogleAuthUtil。我在哪里添加这个?
-
低于 buildToolsVersion "25.0.0" 就可以了
-
不,即使现在也没有帮助我得到同样的错误
-
嗯..似乎是一个proguard问题。也许你可以做这样的事情。stackoverflow.com/questions/16931847/…或stackoverflow.com/a/24109609/3111083
标签: java android gradle dependencies android-gradle-plugin