Flo
Flo

Reputation: 173

Cannot determine build data storage root for project error IntelliJ Android

I am trying to build an android application I coded, and I get the following error:

Error:build: Cannot determine build data storage root for project /Users/Flo/Programming/Android/workspace/<ProjectName>

I have marked src and gen as source folders, and res as resource folder.

Any help? Thanks!

Upvotes: 14

Views: 43493

Answers (4)

mr blu
mr blu

Reputation: 469

In intellij I invalidated the cache and restarted. Worked fine

Upvotes: 0

simon
simon

Reputation: 12902

I had the same problem. The problem was that the project directory and files were created under the root user, but IntelliJ was running as my own user, so IntelliJ could not create the necessary files. The solution was to run

chown -R myusername projectfolder

Upvotes: 2

Abderrahmen
Abderrahmen

Reputation: 496

I deleted the .idea folder and the .iml file then i reimported the project in Intellij and it worked for me.

Upvotes: 13

jlucky
jlucky

Reputation: 144

You should build a project(just as the workspace in Eclipse) first, it will generate a .idea directory. And then build a module(as the project in Eclipse) under that project. Finally, you can run your app successfully.

Upvotes: 11

Related Questions