Exception when compiling an android project using android-maven-plugin

Answered

My company does not use gradle, and instead we use the android-maven-plugin (http://simpligility.github.io/android-maven-plugin/). The project compiles fine on the command line with maven. Also, Idea 2017.1.5 works fine with the import maven project / compile button. However, the recent update to Idea 2017.2 causes the following exception on this line(https://github.com/JetBrains/android/blob/02fe7f76d8f604fd9e412dd96d2690104bb1eb3b/jps-plugin/src/org/jetbrains/jps/android/AndroidJpsUtil.java#L404).

I'm guessing that some form of gradle integration broke this?

  1. Error:Internal error: (java.lang.ClassNotFoundException) com.android.prefs.AndroidLocation$AndroidLocationException
  2. java.lang.ClassNotFoundException: com.android.prefs.AndroidLocation$AndroidLocationException
  3. 	at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
  4. 	at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
  5. 	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
  6. 	at org.jetbrains.jps.android.AndroidJpsUtil.getAndroidTarget(AndroidJpsUtil.java:404)
  7. 	at org.jetbrains.jps.android.AndroidJpsUtil.getAndroidPlatform(AndroidJpsUtil.java:480)
  8. 	at org.jetbrains.jps.android.builder.AndroidPreDexBuildTarget.computeRootDescriptors(AndroidPreDexBuildTarget.java:110)
  9. 	at org.jetbrains.jps.builders.impl.BuildRootIndexImpl.addRoots(BuildRootIndexImpl.java:72)
  10. 	at org.jetbrains.jps.builders.impl.BuildRootIndexImpl.<init>(BuildRootIndexImpl.java:62)
  11. 	at org.jetbrains.jps.cmdline.BuildRunner.load(BuildRunner.java:84)
  12. 	at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:267)
  13. 	at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:125)
  14. 	at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:236)
  15. 	at org.jetbrains.jps.service.impl.SharedThreadPoolImpl.lambda$executeOnPooledThread$0(SharedThreadPoolImpl.java:42)
  16. 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
  17. 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  18. 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  19. 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  20. 	at java.lang.Thread.run(Thread.java:745)
2 comments
Comment actions Permalink

Please file a bug at https://youtrack.jetbrains.com/issues/IDEA with the logs attached.

0
Comment actions Permalink

Never mind, it's already reported, so just follow https://youtrack.jetbrains.com/issue/IDEA-176144 for updates.

0

Please sign in to leave a comment.