java - Android - twitter4j Proguard 错误

标签 java android proguard obfuscation twitter4j

我在尝试混淆我的 apk 时遇到问题 - 与 this SO question 中报告的问题相同。我应用了该问题已接受的答案,然后构建了我的 apk。

但是,当我运行应用程序时,它在显示第一个启动屏幕之前崩溃了。

如何调试这个和/或我的 proguard-project.txt 文件中是否缺少任何内容??...

# To enable ProGuard in your project, edit project.properties
# to define the proguard.config property as described in that file.
#
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}

-dontwarn twitter4j.**

注意 - 我还在我的应用中使用 android-support-v4.jaracra-4.5.0.jar 库。

最佳答案

添加-keep class twitter4j.** { *; } 到您的 proguard-project.txt 文件。

关于java - Android - twitter4j Proguard 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27715101/

相关文章:

java - 调整 JFrame 大小后 JScrollPane 崩溃

java - 滚动时,ListView Listview 项目会改变位置。为什么?

java - Eclipse 在一段时间后停止突出显示引用

java - 如何在 ubuntu 14.0 中运行演示 "hello world"android 应用程序?

android - 反混淆不适用于 android studio 3.0

android - IBM MobileFirst 7 依赖项

java - 如何在Jasper中使用路径之前检查文件是否存在

java - 如果存在同名的内部枚举,如何访问枚举

android - Flutter Plugin 使用 Kotlin,Activity 总是返回 null

android - 仅使用 build.xml 插入构建目标?