IDEA Failed to load dx.jar
IDEA-177053 Android app crashes on build "Failed to load dx.jar"
Error:Android Pre Dex: [cordova-2.3.0.jar] Failed to load dx.jar Error:Android Pre Dex: [cordova-2.3.0.jar] java.lang.ClassNotFoundException: com.android.dx.command.DxConsole Error:Android Pre Dex: [cordova-2.3.0.jar] at java.net.URLClassLoader.findClass(URLClassLoader.java:381) Error:Android Pre Dex: [cordova-2.3.0.jar] at java.lang.ClassLoader.loadClass(ClassLoader.java:424) Error:Android Pre Dex: [cordova-2.3.0.jar] at java.lang.ClassLoader.loadClass(ClassLoader.java:357) Error:Android Pre Dex: [cordova-2.3.0.jar] at org.jetbrains.android.compiler.tools.AndroidDxRunner.loadDex(AndroidDxRunner.java:80) Error:Android Pre Dex: [cordova-2.3.0.jar] at org.jetbrains.android.compiler.tools.AndroidDxRunner.runDex(AndroidDxRunner.java:136) Error:Android Pre Dex: [cordova-2.3.0.jar] at org.jetbrains.android.compiler.tools.AndroidDxRunner.main(AndroidDxRunner.java:336) Error:Android Pre Dex: [cordova-2.3.0.jar] Exception in thread "main" java.lang.NullPointerException Error:Android Pre Dex: [cordova-2.3.0.jar] at org.jetbrains.android.compiler.tools.AndroidDxRunner.runDex(AndroidDxRunner.java:139)
解决方案:
删除SDK根目录下面的build-tools文件夹中版本26及以上的文件夹