- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
由于 Amazon AWS SDK 的问题,当启用 ProGuard 时,我的 Android 应用无法从 Eclipse 导出。
我使用的是适用于 Android 的 AWS SDK 1.6.1 版。
记录到控制台的错误如下所示。
我遵循了 Amazon 提供的推荐 ProGuard 配置设置,但无济于事:https://mobile.awsblog.com/post/Tx2OC71PFCTC63E/Using-ProGuard-with-the-AWS-SDK-for-Android
我也试过在 ProGuard 配置中排除 Amazon 类,但这也不起作用。
无论其值(value)如何,我已经下载了 Amazon 自己的示例项目并按照他们的说明启用了 ProGuard,但在导出项目时我收到了相同的 ProGuard 错误。
谁能告诉我一个有效的 ProGuard 配置以用于 AWS SDK?
这些是我项目中的 jar :
Simpl3r-1.0.2.jar
aws-android-sdk-1.6.1-core.jar
androidplot-core-0.6.0-sources.jar
universal-image-loader-1.8.6-with-sources.jar
android_lvl.jar
androidplot-core-0.6.0-javadoc.jar
androidplot-core-0.6.0.jar
gson-2.2.4.jar
date4j.jar
crittercism_v3_0_3_sdkonly.jar
aws-android-sdk-1.6.1-s3.jar
android-support-v7-appcompat.jar
CWAC-AdapterWrapper.jar
cwac-endless-master.jar
android-support-v4.jar
我的 ProGuard 配置如下:
-dontusemixedcaseclassnames
-dontskipnonpubliclibraryclasses
-verbose
-dontoptimize
-dontpreverify
-keepattributes *Annotation*
-keep public class com.google.vending.licensing.ILicensingService
-keep public class com.android.vending.licensing.ILicensingService
# For native methods, see http://proguard.sourceforge.net/manual/examples.html#native
-keepclasseswithmembernames class * {
native <methods>;
}
# keep setters in Views so that animations can still work.
# see http://proguard.sourceforge.net/manual/examples.html#beans
-keepclassmembers public class * extends android.view.View {
void set*(***);
*** get*();
}
# We want to keep methods in Activity that could be used in the XML attribute onClick
-keepclassmembers class * extends android.app.Activity {
public void *(android.view.View);
}
# For enumeration classes, see http://proguard.sourceforge.net/manual/examples.html#enumerations
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
-keepclassmembers class **.R$* {
public static <fields>;
}
# The support library contains references to newer platform versions.
# Don't warn about those in case this app is linking against an older
# platform version. We know about them, and they are safe.
-dontwarn android.support.**
# AWS:
-keep class org.apache.commons.logging.** { *; }
-keep class com.amazonaws.services.sqs.QueueUrlHandler { *; }
-keep class com.amazonaws.javax.xml.transform.sax.* { public *; }
-keep class com.amazonaws.javax.xml.stream.** { *; }
-keep class com.amazonaws.services.**.model.*Exception* { *; }
-keep class org.codehaus.** { *; }
-keepattributes Signature,*Annotation*
-dontwarn javax.xml.stream.events.**
-dontwarn org.codehaus.jackson.**
-dontwarn org.apache.commons.logging.impl.**
-dontwarn org.apache.http.conn.scheme.**
-dontwarn com.amazonaws.services.securitytoken.**
[2013-12-11 15:46:47 - iDukan] Proguard returned with error code 1. See console
[2013-12-11 15:46:47 - iDukan] Note: there were 1 duplicate class definitions.
[2013-12-11 15:46:47 - iDukan] Warning: com.amazonaws.org.apache.http.HttpHost: can't find referenced class org.apache.http.annotation.Immutable
[2013-12-11 15:46:47 - iDukan] Warning: com.amazonaws.org.apache.http.HttpVersion: can't find referenced class org.apache.http.annotation.Immutable
[2013-12-11 15:46:47 - iDukan] Warning: com.amazonaws.org.apache.http.ProtocolVersion: can't find referenced class org.apache.http.annotation.Immutable
[2013-12-11 15:46:47 - iDukan] Warning: com.amazonaws.org.apache.http.auth.AUTH: can't find referenced class org.apache.http.annotation.Immutable
[2013-12-11 15:46:47 - iDukan] Warning: com.amazonaws.org.apache.http.auth.AuthOption: can't find referenced class org.apache.http.annotation.Immutable
[2013-12-11 15:46:47 - iDukan] Warning: com.amazonaws.org.apache.http.auth.AuthSchemeRegistry: can't find referenced class org.apache.http.annotation.ThreadSafe
[2013-12-11 15:46:47 - iDukan] Warning: com.amazonaws.org.apache.http.auth.AuthScope: can't find referenced class org.apache.http.annotation.Immutable
[2013-12-11 15:46:47 - iDukan] Warning: com.amazonaws.org.apache.http.auth.AuthState: can't find referenced class org.apache.http.annotation.NotThreadSafe
[2013-12-11 15:46:47 - iDukan] Warning: com.amazonaws.org.apache.http.auth.AuthenticationException: can't find referenced class org.apache.http.annotation.Immutable
[2013-12-11 15:46:47 - iDukan] Warning: com.amazonaws.org.apache.http.auth.BasicUserPrincipal: can't find referenced class org.apache.http.annotation.Immutable
[2013-12-11 15:46:47 - iDukan] Warning: com.amazonaws.org.apache.http.auth.InvalidCredentialsException: can't find referenced class org.apache.http.annotation.Immutable
[2013-12-11 15:46:47 - iDukan] Warning: com.amazonaws.org.apache.http.auth.MalformedChallengeException: can't find referenced class org.apache.http.annotation.Immutable
[2013-12-11 15:46:47 - iDukan] Warning: com.amazonaws.org.apache.http.auth.NTCredentials: can't find referenced class org.apache.http.annotation.Immutable
...
[2013-12-11 15:46:47 - iDukan] Warning: there were 347 unresolved references to classes or interfaces.
[2013-12-11 15:46:47 - iDukan] You may need to add missing library jars or update their versions.
[2013-12-11 15:46:47 - iDukan] If your code works fine without the missing classes, you can suppress
[2013-12-11 15:46:47 - iDukan] the warnings with '-dontwarn' options.
[2013-12-11 15:46:47 - iDukan] (http://proguard.sourceforge.net/manual/troubleshooting.html#unresolvedclass)
[2013-12-11 15:46:47 - iDukan] java.io.IOException: Please correct the above warnings first.
[2013-12-11 15:46:47 - iDukan] at proguard.Initializer.execute(Initializer.java:369)
[2013-12-11 15:46:47 - iDukan] at proguard.ProGuard.initialize(ProGuard.java:212)
[2013-12-11 15:46:47 - iDukan] at proguard.ProGuard.execute(ProGuard.java:87)
[2013-12-11 15:46:47 - iDukan] at proguard.ProGuard.main(ProGuard.java:484)
最佳答案
AmazonAWS 引用的缺失 Apache 注释可能是无害的。您可以告诉 ProGuard 忽略该问题:
-dontwarn org.apache.http.annotation.**
或更广泛地说,忽略库中任何 Unresolved 引用:
-dontwarn com.amazonaws.**
如 ProGuard's troubleshooting page 的链接中所述在控制台日志中,您可能可以对所有 347 个未解析的引用执行此操作,前提是您的应用程序的调试构建工作正常。
关于android - 使用 AWS SDK 的 ProGuard,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20524273/
我正在细读 http://www.khronos.org/网站,只找到了 OpenCL 的头文件(不是我不关心的 OpenGL)。如何获取 OpenCL SDK? 最佳答案 AMD 的 ATI Str
Android 项目中最低(最低 sdk)和最高(目标 sdk)级别是否有任何影响。这些东西是否会影响项目的可靠性和效率。 最佳答案 没有影响,如果您以 SDK 级别 8 为目标,那么您的应用将以 9
“min sdk version/target sdk version”和“compile sdk version”有什么区别?我知道 min 和 target sdk 是什么意思,但是 compil
我正在尝试运行 Dji Mobile-Sdk-Android:https://github.com/dji-sdk/Mobile-SDK-Android使用 dji 网站上的说明:https://de
我目前正在向我的 iPhone 应用程序添加新的 Facebook iOS sdk 3.1.1。我看到 sdk 有重大变化。例如。我的旧 sdk 创建一个 Facebook 对象并从 FBReques
我最近刚刚下载了 Xcode 4.6 with mac 10.8.4 with iOS 6.0 SDK package,我立即注意到我无法使用我的 iPhone 3Gs with iOS 4.6 进行
我尝试下载 OpenCL SDK。但是没办法。我有一个 AMD GPU,所以我在谷歌上搜索了 AMD SDK,但是来自谷歌的所有链接和一些教程都被破坏了,不可能通过 AMD 开发者网站找到 sdk。
安装 Google Cloud SDK 后,当我运行时 gcloud 授权登录 我收到一条错误消息: Your browser has been opened to visit: https://a
我一直在 nvidia 网站上搜索 GPU 计算 SDK,因为我正在尝试构建具有 cuda 支持的点云库 (PCL)。但是,在 nvidia 网站上,我只能找到工具包的链接,而不是 SDK 的单个下载
Closed. This question needs to be more focused。它当前不接受答案。 想改善这个问题吗?更新问题,使其仅关注editing this post一个问题。 2
当我打开 Android SDK 管理器时,会出现一个屏幕“选择要安装的包”。它列出了一堆带有绿色复选标记(已经安装)的软件包,还有一些带有 x's 的软件包,它们没有安装。如果我选择“全部接受”,它
在开发过程中,我发布了 SDK 21 Lollipop,但我无法在我的 KitKat 设备上使用它。应用程序非常简单,我只将 SDK 用于动画和 Material 设计,但是当我尝试对 Play 商店
enter image description here friend 们好 在使用 Linux、jenkins 和 docker 探索 dotnet 核心时,我遇到了构建问题,该问题在标题“/usr
关闭。这个问题需要debugging details .它目前不接受答案。 编辑问题以包含 desired behavior, a specific problem or error, and th
我创建了一个flutter项目,运行flutter packages get,输出如下:【二】flutter包搞定等待另一个 flutter 命令释放启动锁...第二次运行“flutter packa
这个问题在这里已经有了答案: What are the Android SDK build-tools, platform-tools and tools? And which version sh
我使用 Corona SDK 已经快一年了,并且开发了几个简单的游戏。我现在正在寻找的是在 Corona SDK 中创建 3D 幻觉的某种方法。如果有人有 Corona 3D 方面的经验,我将不胜感激
我有一个CLDC 1.1 / MIDP 2.0项目,可以使用Java ME SDK 3.2很好地进行编译。 最近,我已将Java SE升级到8,结果Java ME SDK开始在Windows启动时显示
有没有办法以编程方式控制连接到华擎主板的 RGB 照明?我知道华硕有一个 Aura SDK,但华擎是否也有一个用于他们的硬件? 如果是,我在哪里可以找到它? 最佳答案 没有用于华擎多彩的 sdk。但是
如何使用 crm 2011 sdk 和 XrmServiceContext 创建事务? 在下一个示例中,'new_brand' 是一些自定义实体。我想创建三个品牌。第三个拥有错误的 OwnerID g
我是一名优秀的程序员,十分优秀!