本文介绍了Android Studio 运行时错误存根!在 com.amazon.device.messaging.ADMMessageReceiver.<init>()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我构建我的 Android 应用程序的 Amazon (Kindle) 风格时,我遇到了这个运行时错误:

When I build the Amazon (Kindle) flavor of my Android app I run into this Runtime error:

Caused by: java.lang.RuntimeException: Stub!
at com.amazon.device.messaging.ADMMessageReceiver.<init>()

我需要本地 amazon-device-messaging.jar 文件来编译我的应用程序,但是我不需要在运行时包含它,因为 amazon 设备将具有必要的类和方法.如何更新我的 Android Studio build.gradle 文件以执行此操作?

I need the local amazon-device-messaging.jar file to compile my app, however I do not need to include it during runtime as the amazon device will have the necessary classes and methods. How do I update my Android Studio build.gradle file to do this?

推荐答案

我也遇到了这个问题.添加 Amazon Device Messaging jar 作为库时,Android Studio 自动生成

I also ran into this issue. When adding the Amazon Device Messaging jar as a library, Android Studio automatically generated

dependencies {
    compile files('libs/amazon-device-messaging-1.0.1.jar')
}

我只需要把它切换到

dependencies {
    provided files('libs/amazon-device-messaging-1.0.1.jar')
}

这对我有用.@Clu,我对你的回答投赞成票,但我的声誉不够高.

That did the trick for me. I'd up-vote your answer, @Clu, but I don't have a high enough reputation.

这篇关于Android Studio 运行时错误存根!在 com.amazon.device.messaging.ADMMessageReceiver.<init>()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-01 20:46