Reputation: 481
I'm runing IntelliJ IDEA 13.1.2 on Ubuntu machine. I'm facing with a file generated wrong structure I think. Some one already asked about this problem(), but is not solved.
SOLUTION
I have no reputation to post more than 2 links =)) so I deleted original links ..
because seems nobody helped to give some solution ..
Edite later :
I find few tutorials and for me was a SOLUTION :
http://www.tricedesigns.com/2013/05/16/phonegap-android-studio/
Configuring project like Android from Existing sources and www like empty module (but select target folder from disk), and Adding to SDK some feature like Android 4.0.3 and 4.2.2, solved my problem .. In Project Settings > Facets > I have Android (CordovaLib) checked like Library module.
The problem is ... I use Ubuntu and Windows.. and there are some differences on the interface if IntelliJ IDEA.
so I can't provide step-by-step tutorial, but after few experiences with: phonegap create myFirstApp, phonegap platform add android, phonegap build android ..
and few new pject in IntelliJ..
you will see :D
Happy coding ;)
Upvotes: 2
Views: 2840
Reputation: 101
I'll add my two cents. We ran into this issue while doing Cordova training for our students. The recommended tool from developer.android.com switched from the Eclipse ADT Bundle to Android Studio.
Unfortunately, you can't follow the same workflow. The Cordova 'Getting Started' guide for the Android platform spells out the commands to execute from the command line. But, they are for the Eclipse platform. One step needs to omitted for it to work with Android Studio.
One of the links above (http://www.tricedesigns.com/2013/05/16/phonegap-android-studio/) shows the correct workflow, but if you're used to the Cordova workflow, you may just assume it's the same and do it the same. However! Omit the 'cordova build' step. This causes Android Studio to get the error from the question.
This was on a Windows machine, but the problem and result are the same. Don't do it! Leave that step out and all is well.
Upvotes: 2