【发布时间】:2016-08-21 08:47:28
【问题描述】:
apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'
apply plugin: 'me.tatarka.retrolambda'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'realm-android'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultPublishConfig "debug"
defaultConfig {
applicationId "com.youth4work.ibps"
minSdkVersion 16
targetSdkVersion 23
multiDexEnabled true
versionCode 1
versionName "1.0.0"
}
signingConfigs {
release {
storeFile file('keystore/youth4work_second_key')
keyAlias 'youth4work_second_key_alias'
keyPassword "youth4work"
storePassword "youth4work"
}
debug {
storeFile file('keystore/debug.keystore')
keyAlias 'androiddebugkey'
storePassword 'android'
keyPassword 'android'
}
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
versionNameSuffix "Debug"
debuggable true
}
}
lintOptions {
disable 'InvalidPackage'
checkReleaseBuilds false
}
packagingOptions {
exclude 'META-INF/services/javax.annotation.processing.Processor'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
retrolambda {
jvmArgs '-noverify'
}
dependencies {
final PLAY_SERVICES_VERSION = '8.3.0'
final SUPPORT_LIBRARY_VERSION = '23.3.0'
// Google Play Services
compile "com.google.android.gms:play-services-base:$PLAY_SERVICES_VERSION"
compile "com.google.android.gms:play-services- analytics:$PLAY_SERVICES_VERSION"
compile "com.google.android.gms:play-services-gcm:$PLAY_SERVICES_VERSION"
compile "com.google.android.gms:play-services-plus:$PLAY_SERVICES_VERSION"
// Support Libraries
compile "com.android.support:support-v4:$SUPPORT_LIBRARY_VERSION"
compile "com.android.support:appcompat-v7:$SUPPORT_LIBRARY_VERSION"
compile "com.android.support:recyclerview-v7:$SUPPORT_LIBRARY_VERSION"
compile "com.android.support:cardview-v7:$SUPPORT_LIBRARY_VERSION"
compile "com.android.support:design:$SUPPORT_LIBRARY_VERSION"
compile 'com.android.support:support-annotations:23.3.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.squareup.okhttp3:okhttp:3.2.0'
compile 'com.squareup.okhttp3:logging-interceptor:3.2.0'
compile 'com.squareup.retrofit2:retrofit:2.0.2'
compile 'com.squareup.retrofit2:converter-gson:2.0.2'
compile 'com.squareup.retrofit2:adapter-rxjava:2.0.2'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.jakewharton.timber:timber:4.1.0'
compile 'com.jakewharton.rxbinding:rxbinding:0.4.0'
compile 'com.github.siyamed:android-shape-imageview:0.9.+@aar'
compile 'com.github.kevinsawicki:timeago:1.0.1'
compile 'com.facebook.android:facebook-android-sdk:4.8.2'
compile 'com.rengwuxian.materialedittext:library:2.1.4'
compile 'com.mobsandgeeks:android-saripaar:2.0.2'
compile 'com.joanzapata.iconify:android-iconify-fontawesome:2.1.1'
compile 'com.github.jakob-grabner:Circle-Progress-View:1.2.8'
compile 'com.github.vlonjatg:progress-activity:v1.0.3'
compile 'com.github.PhilJay:MPAndroidChart:v2.2.4'
compile 'com.daasuu:animateHorizontalProgressBar:0.2.2'
compile 'io.reactivex:rxjava:1.1.0'
compile 'io.reactivex:rxandroid:1.1.0'
compile 'com.trello:rxlifecycle:0.4.0'
compile 'com.trello:rxlifecycle-components:0.4.0'
compile('com.github.afollestad.material-dialogs:core:0.8.5.6@aar') {
transitive = true
}
compile('com.mikepenz:fastadapter:1.4.0@aar') {
transitive = true
}
testCompile 'junit:junit:4.12'
}
// Log out test results to console
tasks.matching { it instanceof Test }.all {
testLogging.events = ["failed", "passed", "skipped"]
}
在这里,如果我让minify enabled = false 代码运行良好,而如果我使用 true,则代码显示
信息:Gradle 任务 [:app:assembleRelease] google-services 插件 无法检测到 com.google.android.gms 的任何版本,默认 版本:将使用 8.3.0。请在以下位置应用 google-services 插件 构建文件的底部。 :app:preBuild UP-TO-DATE :app:preReleaseBuild UP-TO-DATE :app:checkReleaseManifest :app:preDebugBuild UP-TO-DATE :app:prepareComAndroidSupportAnimatedVectorDrawable2330Library 最新:app:prepareComAndroidSupportAppcompatV72330Library 最新:app:prepareComAndroidSupportCardviewV72330Library 最新:app:prepareComAndroidSupportDesign2330Library 最新 :app:prepareComAndroidSupportMultidex101Library UP-TO-DATE :app:prepareComAndroidSupportRecyclerviewV72330Library UP-TO-DATE :app:prepareComAndroidSupportSupportV42330Library UP-TO-DATE :app:prepareComAndroidSupportSupportVectorDrawable2330Library 最新:app:prepareComDaasuuAnimateHorizontalProgressBar022Library 最新:app:prepareComFacebookAndroidFacebookAndroidSdk482Library 最新 :app:prepare ComGithubAfollestadMaterialDialogsCore0856Library 最新 :app:prepare ComGithubJakobGrabnerCircleProgressView128Library 最新:app:prepareComGithubSiyamedAndroidShapeImageview093Library 最新:app:prepareComGithubVlonjatgProgressActivityV103Library 最新 :app:prepareComGoogleAndroidGmsPlayServicesAnalytics830Library 最新:app:prepareComGoogleAndroidGmsPlayServicesBase830Library 最新 :app:prepareComGoogleAndroidGmsPlayServicesBasement830Library 最新:app:prepareComGoogleAndroidGmsPlayServicesGcm830Library 最新 :app:prepareComGoogleAndroidGmsPlayServicesMeasurement830Library 最新:app:prepareComGoogleAndroidGmsPlayServicesPlus830Library 最新:app:prepareComJakewhartonRxbindingRxbinding040Library 最新:app:prepareComJakewhartonTimberTimber410Library 最新 :app:prepareComJoanzapataIconifyAndroidIconify211Library UP-TO-DATE :app:prepareComJoanzapataIconifyAndroidIconifyFontawesome211Library 最新:app:prepareComMikepenzFastadapter140Library 最新 :app:prepareComRengwuxianMaterialedittextLibrary214Library UP-TO-DATE :app:prepareComTrelloRxlifecycle040Library UP-TO-DATE :app:prepareComTrelloRxlifecycleComponents040Library UP-TO-DATE :app:prepareIoReactivexRxandroid110Library UP-TO-DATE :app:prepareIoRealmRealmAndroidLibrary0883Library UP-TO-DATE :app:prepareMeZhanghaiAndroidMaterialprogressbarLibrary114Library 最新:app:prepareReleaseDependencies:app:compileReleaseAidl :app:compileReleaseRenderscript :app:generateReleaseBuildConfig :app:generateReleaseAssets 最新 :app:mergeReleaseAssets :app:generateReleaseResValues 最新 :app:processReleaseGoogleServices :app:generateReleaseResources :app:mergeReleaseResources :app:processReleaseManifest :app:processReleaseResources :app:generateReleaseSources :app:compileReleaseJavaWithJavac 注意:一些输入文件使用或 覆盖已弃用的 API。注意:使用 -Xlint:deprecation 重新编译 细节。注意:某些输入文件使用未经检查或不安全的操作。 注意:使用 -Xlint:unchecked 重新编译以获取详细信息。 :app:compileRetrolambdaRelease :app:compileReleaseNdk UP-TO-DATE :app:compileReleaseSources :app:prePackageMarkerForRelease :app:transformClassesWithRealmTransformerForRelease :app:processReleaseJavaRes 最新 :app:transformResourcesWithMergeJavaResForRelease :app:transformClassesAndResourcesWithProguardForRelease assmember) 警告:对库类成员有 1 个未解决的引用。 您可能需要更新库版本。 (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedlibraryclassmember) 警告:处理任务 java.io.IOException 时出现异常:请 首先更正上述警告。 :app:transformClassesAndResourcesWithProguardForRelease 失败 错误:任务执行失败 ':app:transformClassesAndResourcesWithProguardForRelease'.
java.io.IOException: 请先更正上述警告。信息:BUILD FAILED 信息:总时间:27.946 秒 信息:1 错误信息:91 警告信息:查看完整 控制台输出
【问题讨论】: