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

after importing the project from git , it successfully loads all the libraries. But when I tried to rebuild the project , it throws this error, which I did not 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 reinstalling maven, intellij idea, installing all the paths again, etc. into system variables, reinstall android sdks ..., tried to configure some parameters in IntelliJ Idea 12.0.4, rewrite some options in the idea. properties, etc., but it still causes this error. Any suggestions?

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

0
git android intellij-idea maven dex
source share
2 answers

Profile redirection is enabled on your system and Java Bug affects you.

Check this KB document for solution.

+2
source share

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

+1
source share

All Articles