gpt4 book ai didi

Android studio minify enabled = true ,无法生成 apk?

转载 作者:行者123 更新时间:2023-11-29 17:20:21 25 4
gpt4 key购买 nike

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,则代码显示

Information:Gradle tasks [:app:assembleRelease] google-services plugin could not detect any version for com.google.android.gms, default version: 8.3.0 will be used. please apply google-services plugin at the bottom of the build file. :app:preBuild UP-TO-DATE :app:preReleaseBuild UP-TO-DATE :app:checkReleaseManifest :app:preDebugBuild UP-TO-DATE :app:prepareComAndroidSupportAnimatedVectorDrawable2330Library UP-TO-DATE :app:prepareComAndroidSupportAppcompatV72330Library UP-TO-DATE :app:prepareComAndroidSupportCardviewV72330Library UP-TO-DATE :app:prepareComAndroidSupportDesign2330Library UP-TO-DATE :app:prepareComAndroidSupportMultidex101Library UP-TO-DATE :app:prepareComAndroidSupportRecyclerviewV72330Library UP-TO-DATE :app:prepareComAndroidSupportSupportV42330Library UP-TO-DATE :app:prepareComAndroidSupportSupportVectorDrawable2330Library UP-TO-DATE :app:prepareComDaasuuAnimateHorizontalProgressBar022Library UP-TO-DATE :app:prepareComFacebookAndroidFacebookAndroidSdk482Library UP-TO-DATE :app:prepareComGithubAfollestadMaterialDialogsCore0856Library UP-TO-DATE :app:prepareComGithubJakobGrabnerCircleProgressView128Library UP-TO-DATE :app:prepareComGithubSiyamedAndroidShapeImageview093Library UP-TO-DATE :app:prepareComGithubVlonjatgProgressActivityV103Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesAnalytics830Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesBase830Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesBasement830Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesGcm830Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesMeasurement830Library UP-TO-DATE :app:prepareComGoogleAndroidGmsPlayServicesPlus830Library UP-TO-DATE :app:prepareComJakewhartonRxbindingRxbinding040Library UP-TO-DATE :app:prepareComJakewhartonTimberTimber410Library UP-TO-DATE :app:prepareComJoanzapataIconifyAndroidIconify211Library UP-TO-DATE :app:prepareComJoanzapataIconifyAndroidIconifyFontawesome211Library UP-TO-DATE :app:prepareComMikepenzFastadapter140Library UP-TO-DATE :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 UP-TO-DATE :app:prepareReleaseDependencies :app:compileReleaseAidl :app:compileReleaseRenderscript :app:generateReleaseBuildConfig :app:generateReleaseAssets UP-TO-DATE :app:mergeReleaseAssets :app:generateReleaseResValues UP-TO-DATE :app:processReleaseGoogleServices :app:generateReleaseResources :app:mergeReleaseResources :app:processReleaseManifest :app:processReleaseResources :app:generateReleaseSources :app:compileReleaseJavaWithJavac Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. :app:compileRetrolambdaRelease :app:compileReleaseNdk UP-TO-DATE :app:compileReleaseSources :app:prePackageMarkerForRelease :app:transformClassesWithRealmTransformerForRelease :app:processReleaseJavaRes UP-TO-DATE :app:transformResourcesWithMergeJavaResForRelease :app:transformClassesAndResourcesWithProguardForRelease assmember) Warning:there were 1 unresolved references to library class members. You probably need to update the library versions. (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedlibraryclassmember) Warning:Exception while processing task java.io.IOException: Please correct the above warnings first. :app:transformClassesAndResourcesWithProguardForRelease FAILED Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'.

java.io.IOException: Please correct the above warnings first. Information:BUILD FAILED Information:Total time: 27.946 secs Information:1 error Information:91 warnings Information:See complete output in console

最佳答案

如果启用缩小,构建将调用 Proguard 去除所有不必要的类、成员和方法。为此,您需要一个 proguard 配置文件,该文件将告诉 Proguard 哪些类是您的类的入口点以及应该保留哪些成员和方法。您看到的错误是不匹配方法调用的常见错误。

错误包括指向 Proguard 的链接手册,对错误进行更多描述:您必须确保您使用的是正确的 Android Build Target,并且您保留了所有必要的库及其方法。

尝试在您的属性中调整 Android Build Target。如果这不起作用,您将必须检查您的混淆器配置中是否需要更多条目。

关于Android studio minify enabled = true ,无法生成 apk?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36883302/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com