Android Studio中运行时错误存根!在com.amazon.device.messaging.ADMMessageReceiver<&初始化GT;() [英] Android Studio runtime error Stub! at com.amazon.device.messaging.ADMMessageReceiver.<init>()

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

问题描述

当我建立我的Andr​​oid应用的亚马逊(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文件来编译我的应用程序,但是,我并不需要运行时作为亚马逊的设备将具备必​​要的类和方法中包含它。如何更新我的Andr​​oid工作室的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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆