如何在IntelliJ项目中导入AIDL文件

时间:2015-03-29 15:07:17

标签: android intellij-idea android-ndk

我必须编辑用另一个IDE创建的现有项目并且直接导入整个项目不起作用,所以我重新创建了粘贴各种资源并设置各种库的项目副本,我也复制了main root是一个名为aidl的文件夹,其中包含2个aidl文件。 当我试图运行它时,projec显然编译没有任何错误我得到一个ClassNotFoundException似乎与makel文件中很可能被忽略的aidl文件有关。

如何将aidl文件链接到项目?

错误日志:

java.lang.RuntimeException: Unable to instantiate application com.android.vending.VendingApplication: java.lang.ClassNotFoundException: Didn't find class "com.android.vending.VendingApplication" on path: DexPathList[[zip file "/system/app/LicenseChecker/LicenseChecker.apk"],nativeLibraryDirectories=[/vendor/lib64, /system/lib64]]
            at android.app.LoadedApk.makeApplication(LoadedApk.java:563)
            at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4529)
            at android.app.ActivityThread.access$1500(ActivityThread.java:151)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5257)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
     Caused by: java.lang.ClassNotFoundException: Didn't find class "com.android.vending.VendingApplication" on path: DexPathList[[zip file "/system/app/LicenseChecker/LicenseChecker.apk"],nativeLibraryDirectories=[/vendor/lib64, /system/lib64]]
            at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
            at android.app.Instrumentation.newApplication(Instrumentation.java:980)
            at android.app.LoadedApk.makeApplication(LoadedApk.java:558)
            at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4529)
            at android.app.ActivityThread.access$1500(ActivityThread.java:151)
            at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364)
            at android.os.Handler.dispatchMessage(Handler.java:102)
            at android.os.Looper.loop(Looper.java:135)
            at android.app.ActivityThread.main(ActivityThread.java:5257)
            at java.lang.reflect.Method.invoke(Native Method)
            at java.lang.reflect.Method.invoke(Method.java:372)
            at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
            at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
    Suppressed: java.lang.ClassNotFoundException: com.android.vending.VendingApplication
            at java.lang.Class.classForName(Native Method)
            at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
            at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
            at java.lang.ClassLoader.loadClass(ClassLoader.java:504)

请注意,该项目是标准的IntelliJ应用程序模块化项目,因此我没有任何build.gradle文件

0 个答案:

没有答案