0

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.

user997777
  • 569
  • 1
  • 7
  • 19

2 Answers2

2

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

Check this KB document for the solution.

CrazyCoder
  • 389,263
  • 172
  • 990
  • 904
  • I tried to change that four attributes: config, system, plugin and log but it doesnt help. – user997777 Mar 29 '13 at 15:00
  • Do you see the new paths in the log? Can you post the new log to the question? – CrazyCoder Mar 29 '13 at 15:07
  • Just remove #: idea.config.path=${user.home}/.IdeaIC/config idea.system.path=${user.home}/.IdeaIC/system idea.plugins.path=${user.home}/.IdeaIC/config/plugins idea.log.path=${user.home}/.IdeaIC/system/log In system-variables i set up just MAVE_HOME, JDK, Java path and Android Project SDK - Android 4.2.2 (java version 1.7.0_13) and when I tried to rebuild project, it throws still: – user997777 Mar 29 '13 at 15:14
  • You can't use `user.home` as it's detected incorrectly because of the Java bug, you need to edit the file and specify some fixed paths instead. – CrazyCoder Mar 29 '13 at 15:17
  • Should I uncomment this line: #SET IDEA_PROPERTIES=c:\config\idea.properties ??? Because I think, that Idea will automatically find that file idea.properties, and it doesnt need to set the location of itself? – user997777 Mar 29 '13 at 15:31
  • You can't use paths under `c:/Windows/System32`, use some other directory with full write permissions, that was the whole point of editing the properties file. – CrazyCoder Mar 29 '13 at 15:33
1

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

3akat
  • 164
  • 2
  • 6