Unable to execute DX - IntelliJ Idea (Android + Maven)

谁都会走 提交于 2019-12-12 02:25:45

问题


after I import the project from git, it succesfully download all libraries. But when I tried to rebuild project, it throws this error, that I didn't find anywhere on the internet.

Android Dex: [name_of_project] Unable to execute DX
Android Dex: [name_of_project] java.io.FileNotFoundException: C:\Windows\System32\config\systemprofile\.IdeaIC12\system\compile-server\name_of_project\android\intermediate_artifacts\name_of_project\classes.dex (System cant find the specified path.)

I tried to reinstall maven, intellij idea, set once more all paths and so on in system variables, reinstall android sdks ..., tried to set up some settings in IntelliJ Idea 12.0.4, rewrite some options in idea.properties and so on, but it still throws this error. Any suggestions?

I forgot to write, that when I tried to compile and install project on the phone with ,,mvn clean install", it works. Only with IIdea, it crashed. Im using JDK 1.6, Android 4.2, IIdea 12.0.4, Windows 7 x64 and the last version of Maven.


回答1:


Your system has profile redirection enabled and you are affected by a Java Bug.

Check this KB document for the solution.




回答2:


In my case the problem was in module sdk version. I changed it from 2.2 to 4.4 and the problem was solved.



来源:https://stackoverflow.com/questions/15705150/unable-to-execute-dx-intellij-idea-android-maven

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!