【发布时间】:2023-04-12 20:39:01
【问题描述】:
好吧,这让我快疯了一天。我主要是一个 iOS 人,所以我对 Proguard 和其他东西不太了解。我制作了一个包含 Dropbox 和 Google Drive API 的 Android 应用程序。如果我通过 Eclipse 将它部署在手机上,该应用程序运行良好,但是当我尝试导出应用程序以生成 apk 文件时,我在控制台上遇到了一个令人讨厌的错误。 我的 project.properties 文件是这样的......
# 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 不存在或不是常规文件
所以我编辑了我的 project.properties 并删除了 proguard-project.txt 部分。
现在在创建 apk 时,我在控制台上收到这些错误...
[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 条类似的行。
如果我使用从 bin 文件夹生成的 apk,谷歌驱动器功能在手机中不起作用,但如果我通过 Ecipse 部署它就可以使用。 请帮帮我。
【问题讨论】:
标签: java android eclipse duplicates proguard