android - Urban Airship 崩溃应用程序

标签 android push noclassdeffounderror urbanairship.com

我在尝试将 Urban Airship PUSH 通知集成到我的 Android 应用程序时遇到问题。

我认为我已经在 AndroidManifest 集中获得了我的所有权限和 Intent 过滤器,但是在尝试像这样设置我的 AirshipConfigOptions 后应用程序立即崩溃:

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    AirshipConfigOptions options = AirshipConfigOptions.loadDefaultOptions(this);
    ...
}

我的错误日志说:

java.lang.NoClassDefFoundError: com.urbanairship.AirshipConfigOptions

任何帮助将不胜感激。

最佳答案

您在使用 ProGuard 吗?参见 this article about configuring ProGuard to work with UrbanAirship .

您使用的是 ADT r17 或更高版本吗?从 r17 开始,jar 文件需要位于“libs”文件夹中,将它们放在“lib”中将不起作用(即使 Eclipse 表明没有问题)。参见 this article about dependencies in Android projects .

关于android - Urban Airship 崩溃应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10192435/

相关文章:

java - 如何在改造库中设置超时?

android - RG 3.0 中注入(inject)的 View 为空

android - (Android、iOS、Windows、Linux)服务器轮询、推送、实现服务器

java - Jackson 数据绑定(bind)在 IDE 环境中工作但不在 jar 中

scala - 烫金示例 WordCount 本地模式

android - NoClassDefFoundError: android.graphics.YuvImage(编译但不运行)

android - 如何以编程方式在 SD 卡上创建新目录?

arrays - 如何将新值推送到 Mongoose 中的嵌套数组

ssh:连接到主机 bitbucket.org 端口 22:连接超时致命

android - 检测库是独立构建还是使用 Gradle 作为应用程序依赖项