我有两个项目共享相同的aidl文件.
在第一个项目中,构建在Eclipse和Android Studio中运行完成.
在第二个项目中,构建在Eclipse中运行完成,但在Android Studio中我看到:
Error:[Tracker-PRO-Key] UNEXPECTED TOP-LEVEL EXCEPTION: Error:[Tracker-PRO-Key] com.android.dx.util.ExceptionWithContext Error:[Tracker-PRO-Key] at com.android.dx.util.ExceptionWithContext.withContext(ExceptionWithContext.java:46) Error:[Tracker-PRO-Key] at com.android.dx.dex.cf.CfTranslator.processMethods(CfTranslator.java:344) Error:[Tracker-PRO-Key] at com.android.dx.dex.cf.CfTranslator.translate0(CfTranslator.java:134) Error:[Tracker-PRO-Key] at com.android.dx.dex.cf.CfTranslator.translate(CfTranslator.java:87) Error:[Tracker-PRO-Key] at com.android.dx.command.dexer.Main.processClass(Main.java:487) Error:[Tracker-PRO-Key] at com.android.dx.command.dexer.Main.processFileBytes(Main.java:459) Error:[Tracker-PRO-Key] at com.android.dx.command.dexer.Main.access$400(Main.java:67) Error:[Tracker-PRO-Key] at com.android.dx.command.dexer.Main$1.processFileBytes(Main.java:398) Error:[Tracker-PRO-Key] at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:135) Error:[Tracker-PRO-Key] at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:109) Error:[Tracker-PRO-Key] at com.android.dx.command.dexer.Main.processOne(Main.java:422) Error:[Tracker-PRO-Key] at com.android.dx.command.dexer.Main.processAllFiles(Main.java:333) Error:[Tracker-PRO-Key] at com.android.dx.command.dexer.Main.run(Main.java:209) Error:[Tracker-PRO-Key] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) Error:[Tracker-PRO-Key] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) Error:[Tracker-PRO-Key] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) Error:[Tracker-PRO-Key] at java.lang.reflect.Method.invoke(Method.java:606) Error:[Tracker-PRO-Key] at org.jetbrains.android.compiler.tools.AndroidDxRunner.runDex(AndroidDxRunner.java:139) Error:[Tracker-PRO-Key] at org.jetbrains.android.compiler.tools.AndroidDxRunner.main(AndroidDxRunner.java:261) Error:[Tracker-PRO-Key] at com.intellij.rt.execution.CommandLineWrapper.main(CommandLineWrapper.java:121) Error:[Tracker-PRO-Key] Caused by: java.lang.NullPointerException Error:[Tracker-PRO-Key] at com.android.dx.cf.code.ConcreteMethod.<init>(ConcreteMethod.java:87) Error:[Tracker-PRO-Key] at com.android.dx.cf.code.ConcreteMethod.<init>(ConcreteMethod.java:75) Error:[Tracker-PRO-Key] at com.android.dx.dex.cf.CfTranslator.processMethods(CfTranslator.java:247) Error:[Tracker-PRO-Key] ... 22 more Error:[Tracker-PRO-Key] ...while processing <init> (Lcom/DynaZu/Tracker/Prokey/MainActivity;)V Error:[Tracker-PRO-Key] ...while processing /home/joel/workspace/Tracker-PRO-Key/out/production/Tracker-PRO-Key/com/DynaZu/Tracker/Prokey/MainActivity$1.class Error:[Tracker-PRO-Key] 1 error; aborting
aidl文件非常简单:
package com.DynaZu.Tracker.Prokey; interface IProKEYComm { long getLicenseInfo(); }
如何确定问题????是什么导致这个?我正在使用com.google.android.vending.licensing.这有关系吗?
我已经看到了两次包含库(有不同版本)的问题,但这似乎不是问题所在.任何想法将不胜感激!