我有两个共享同一个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。这可能有关系吗?
我已经看到一个库被包含两次(不同版本)的问题,但这似乎不是这里的问题。任何想法将不胜感激!