Android Studio中运行时错误存根!在com.amazon.device.messaging.ADMMessageReceiver&LT;&初始化GT;() [英] Android Studio runtime error Stub! at com.amazon.device.messaging.ADMMessageReceiver.<init>()
问题描述
当我建立我的Android应用的亚马逊(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>()
我需要在本地亚马逊设备messaging.jar文件来编译我的应用程序,但是,我并不需要运行时作为亚马逊的设备将具备必要的类和方法中包含它。如何更新我的Android工作室的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?
推荐答案
我也遇到了这个问题。当添加亚马逊设备消息罐子作为一个库,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')
}
我只需要切换,为
I just needed to switch that to
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&LT;&初始化GT;()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!