Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

IntelliJ IDEA 12 - New Android Application Module wizard fails with "cannot find resource directory for module"

The problem I'm facing is a very simple one... I can't get IntelliJ IDEA 12 to help me with the creation of an Android application module (project).

After successfully installing IntelliJ IDEA 12 and making acquaintance between the IDE and both SDKs (Java and Android), when I run the "New Module wizard" and choose "Android application module" I receive an error message which states:

"Cannot find resource directory for module < blah >"

Error message

The IDE does not hang, or crash but I'm left with a half Android project which does not contain the mandatory file structure of any (straight forward, recommended) Android application.

Amongst other things:

  • the "res" folder is missing
  • and so is the activity which the wizard asked me about
  • and then there's no AndroidManifest.xml

Here's what the IDEA 12 Wizard creates:

IDEA project structure

and here's what the structure of the project should look like (in this particular case it's the work of an Eclipse - Android integration from a colleague's machine):

Eclipse poject structure

I've replicated the problem several times and it always happened in the same way.

It looks like something's broken in there and I've looked all over the Internet for an answer before finally deciding to ask this question.

I'm sure that all the required files and folders could be created manually but I would like the IDE to help me with this boilerplate stuff since I'm a beginner with Android development and there may be other things not working, behind the scenes, it this is the symptom.

In other words, I feel it would be very important for the wizard to create a working Hello World project. Any help would be greatly appreciated.

like image 655
Eduard Dumitru Avatar asked May 11 '13 12:05

Eduard Dumitru


2 Answers

Remove java*.exe files which in C:\Windows\System32 folder.

It works

like image 61
landry Avatar answered Nov 16 '22 22:11

landry


I've had the same issue today, but resolved it by moving jdk from c:\program_files\java to c:\home\java and updating the system path to it.

like image 3
Anatolii Avatar answered Nov 16 '22 21:11

Anatolii