android – 错误生成签名的apk for release:Proguard配置

android – 错误生成签名的apk for release:Proguard配置,第1张

概述我目前正在尝试为 Android Studio中的应用生成发布版本.我试图在生成发布版本时解决所有问题,但我仍然遇到了一些问题. Warning:com.viewpagerindicator.LinePageIndicator: can't find referenced method 'float ceil(float)' in library class android.util.FloatM 我目前正在尝试为 Android Studio中的应用生成发布版本.我试图在生成发布版本时解决所有问题,但我仍然遇到了一些问题.
Warning:com.vIEwpagerindicator.linePageIndicator: can't find referenced method 'float ceil(float)' in library class androID.util.floatMathWarning:org.androIDannotations.API.rest.RestClIEntheaders: can't find referenced class org.springframework.http.httpAuthenticationWarning:org.androIDannotations.API.rest.RestClIEntSupport: can't find referenced class org.springframework.web.clIEnt.RestTemplateWarning:org.androIDannotations.API.rest.RestErrorHandler: can't find referenced class org.springframework.core.nestedRuntimeExceptionWarning:there were 4 unresolved references to classes or interfaces.     You may need to add missing library jars or update their versions.     If your code works fine without the missing classes,you can suppress     the warnings with '-dontwarn' options.    (http://proguard.sourceforge.net/manual/troubleshooting.HTML#unresolvedclass)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)Exception while processing task java.io.IOException: Please correct the above warnings first.

我也被提出了一个错误

Error:Execution Failed for task ':app:packageRelease'.> Unable to compute hash of  /Users/rohanmahale/AndroIDStudioProjects/Prism/app/build/intermediates/classes-proguard/release/classes.jar

在我的gradle文件中,我设置了以下内容

androID {compileSdkVersion 23buildToolsversion '23.0.2'defaultConfig {    applicationID 'com.prism.prismapp'    minSdkVersion 16    targetSdkVersion 23    versionCode 1    versionname "1.0"}buildTypes {    release {        MinifyEnabled true        proguardfiles getDefaultProguardfile('proguard-androID.txt'),'proguard-rules.pro'    }}productFlavors {}

}

我的依赖列表如下

dependencIEs {compile filetree(include: ['*.jar'],dir: 'libs')apt "org.androIDannotations:androIDannotations:$AAVersion"compile "org.androIDannotations:androIDannotations-API:$AAVersion"compile 'com.androID.support:appcompat-v7:23.1.0'compile 'com.androID.support:cardvIEw-v7:23.0.+'compile 'com.androID.support:recyclervIEw-v7:23.0.+'compile 'de.greenrobot:eventbus:2.4.0'compile 'com.joooonho:selectableroundedimagevIEw:1.0.1'compile 'com.commonsware.cwac:camera:0.6.+'compile 'com.squareup.retrofit:retrofit:1.9.0'compile 'commons-io:commons-io:2.4'compile 'com.facebook.androID:facebook-android-sdk:4.7.0'compile 'com.github.nkzawa:socket.io-clIEnt:0.5.2'compile 'io.nlopez.smartlocation:library:3.2.0'compile('com.crashlytics.sdk.androID:crashlytics:2.5.2@aar') {    transitive = true;}compile 'uk.co.chrisjenx:calligraphy:2.1.0'compile 'com.github.bumptech.glIDe:glIDe:3.6.1'compile 'com.pixplicity.multiviewpager:library:1.0'compile 'com.githang:vIEwpagerindicator:2.4.2@aar'deBUGCompile 'com.squareup.leakcanary:leakcanary-androID:1.3.1'releaseCompile 'com.squareup.leakcanary:leakcanary-androID-no-op:1.3.1'compile 'com.commit451:PhotoVIEw:1.2.4'compile 'me.villani.lorenzo.androID:android-cropimage:1.1.0'compile ('com.Google.androID.gms:play-services-analytics:8.1.0') {    exclude module: 'play-services-ads'}}

如何摆脱问题并成功创建发布版本?

更新:

我能够摆脱与androID注释相关的警告.

我留下了以下问题

Warning:com.vIEwpagerindicator.linePageIndicator: can't find referenced method 'float ceil(float)' in library class androID.util.floatMathWarning: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)
解决方法 对我来说,目前的解决方案是将以下行添加到我的proguard文件中:
-dontwarn com.vIEwpagerindicator.**

这将在您创建发布版本时删除上面包中的警告

总结

以上是内存溢出为你收集整理的android – 错误生成签名的apk for release:Proguard配置全部内容,希望文章能够帮你解决android – 错误生成签名的apk for release:Proguard配置所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1140844.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-31
下一篇 2022-05-31

发表评论

登录后才能评论

评论列表(0条)

保存