我有亚马逊设备消息传递的错误。
以gradle编译:
//compile in gradle
provided files('libs/amazon-device-messaging-1.0.1.jar')
我已经尝试过了:
编译文件(' libs / amazon-device-messaging-1.0.1.jar')
清单:
<permission android:name="com.bookmark.money.permission.RECEIVE_ADM_MESSAGE"
android:protectionLevel="signature" />
<uses-permission android:name="com.bookmark.money.permission.RECEIVE_ADM_MESSAGE" />
<uses-permission android:name="com.amazon.device.messaging.permission.RECEIVE" />
<application ...>
<amazon:enable-feature
android:name="com.amazon.device.messaging"
android:required="true" />
</application>
致电ADM:
//call adm
ADM adm = new ADM(context); //error inline
logcat中的:
E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.NoClassDefFoundError: com.amazon.device.messaging.ADM
at com.zoostudio.moneylover.cloudMessage.CloudMessageHelper.getCloudMessageId(CloudMessageHelper.java:21)
at com.zoostudio.moneylover.cloudMessage.CloudMessageHelper.register(CloudMessageHelper.java:14)
at com.zoostudio.moneylover.MoneyApplication.createObjectSingleton(MoneyApplication.java:511)
at com.zoostudio.moneylover.MoneyApplication.onCreate(MoneyApplication.java:294)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1000)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4391)
at android.app.ActivityThread.access$1300(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1294)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5041)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method)'
如果您有任何想法,请帮帮我!
*更新:
来自亚马逊的Levon回复我。 ADM可以在物理设备(亚马逊或非亚马逊)上运行但不能运行:(
同样的错误:
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/amazon/device/messaging/ADM;