Proguard的问题创造的apk [英] Proguard problems with apk creation

查看:278
本文介绍了Proguard的问题创造的apk的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

OK这是推动我坚果因为一天。我主要是在iOS的家伙,所以我不知道很多关于Proguard的和东西。我做了一个Android应用程序,它包括Dropbox和谷歌云端硬盘API。该应用程序是伟大的工作,如果我一个电话直通的Eclipse中部署它,但我得到的控制台一个讨厌的错误,当我尝试导出为APK文件生成的应用程序。
我project.properties文件是这样的...

OK This is driving me nuts since a day. I am mainly an iOS guy so i dont know much about Proguard and stuff. I have made an Android app which includes both dropbox and Google Drive API. The app is working great if i deploy it on a phone thru Eclipse but I am getting a nasty error on Console when i try to export the app for apk file generation. My project.properties files was like so...

# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt:proguard-google-api-client.txt

# Project target.
target=android-17
android.library=false

和错误对话框是这样的...
PROJECT_FOLDER_NAME / proguard的-project.txt不存在或不是一个普通文件

And the error dialog was this... PROJECT_FOLDER_NAME/proguard-project.txt does not exist or is not a regular file

所以我编辑我的project.properties并删除 proguard的-project.txt 部分。

So i edited my project.properties and removed proguard-project.txt part.

现在在创建APK我得到控制台这些错误...

Now while creating apk i get these errors on console...

[2013-05-15 18:48:28 - BackMyAppUp] Proguard returned with error code 1. See console
[2013-05-15 18:48:28 - BackMyAppUp] Note: there were 367 duplicate class definitions.
[2013-05-15 18:48:28 - BackMyAppUp] Warning: org.apache.commons.logging.impl.ServletContextCleaner: can't find superclass or interface javax.servlet.ServletContextListener
[2013-05-15 18:48:28 - BackMyAppUp] Warning: org.apache.http.entity.mime.FormBodyPart: can't find superclass or interface org.apache.james.mime4j.message.BodyPart
[2013-05-15 18:48:28 - BackMyAppUp] Warning: org.apache.http.entity.mime.HttpMultipart: can't find superclass or interface org.apache.james.mime4j.message.Multipart
[2013-05-15 18:48:28 - BackMyAppUp] Warning: org.apache.http.entity.mime.MinimalField: can't find superclass or interface org.apache.james.mime4j.parser.Field
[2013-05-15 18:48:28 - BackMyAppUp] Warning: org.apache.http.entity.mime.content.AbstractContentBody: can't find superclass or interface org.apache.james.mime4j.message.SingleBody
[2013-05-15 18:48:28 - BackMyAppUp] Warning: org.apache.http.entity.mime.content.ContentBody: can't find superclass or interface org.apache.james.mime4j.message.Body
[2013-05-15 18:48:28 - BackMyAppUp] Warning: org.apache.http.entity.mime.content.ContentBody: can't find superclass or interface org.apache.james.mime4j.descriptor.ContentDescriptor
[2013-05-15 18:48:28 - BackMyAppUp] Warning: library class android.net.http.AndroidHttpClient extends or implements program class org.apache.http.client.HttpClient
[2013-05-15 18:48:28 - BackMyAppUp] Warning: com.google.android.gms.auth.GoogleAuthUtil: can't find referenced class com.google.android.gms.R
[2013-05-15 18:48:28 - BackMyAppUp] Warning: com.google.android.gms.auth.GoogleAuthUtil: can't find referenced class com.google.android.gms.R$string
[2013-05-15 18:48:28 - BackMyAppUp] Warning: com.google.android.gms.auth.GoogleAuthUtil: can't find referenced class com.google.android.gms.R$string
[2013-05-15 18:48:28 - BackMyAppUp] Warning: com.google.android.gms.auth.GoogleAuthUtil: can't find referenced class com.google.android.gms.R$string

和一些类似的300线。

and some 300 similar lines.

如果我使用bin文件夹中生成APK,谷歌的驱动器功能不会在电话中工作,但它的工作原理,如果我部署直通的Ecipse。
请帮助我。

If i use the apk generated from bin folder, the google drive feature doesn't work in the phone, but it works if i deploy thru Ecipse. Please help me out.

推荐答案

嗯,这感觉有点傻了,3天我使用ProGuard搞砸左右,但问题是,我用在发布的apk调试密钥库SHA1密钥,因此,谷歌驱动程序崩溃,我以前在谷歌API控制台正确的SHA1关键要解决它。

Well this feels kinda stupid, for 3 days I messed around with proguard but the problem was that I used the debug keystore SHA1 key in the release apk, hence the Google drive app crash, I used the correct SHA1 key in Google API console to solve it.

这篇关于Proguard的问题创造的apk的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆