When I run the command, I get the error:
C:\Users\me\adtworkspace\project1>cordova platform add android [Error: The provided path "C:\Users\me\adtworkspace\project1\platforms\android" is not an Android project.]
What am I doing wrong?
Yes it's indeed a Cordova Metadata issue. So Krystofs' answer is correct. Where: The "right thing" to do is, to give a
# cordova platform rm <platform>
command :) Then - afterwards - another adding of the plaform shall sort the issue
I had the same problem which I solved using the -d flag to show debug output
cordova -d platform add android
My debug output showed that I need to set a JAVA_HOME environment variable and then I needed to add JAVA and ANT to the path.
If you were to do a "cordova -d platform add android", you'll probably see that it is because a prior error happened due to "There is no script engine for file extension ".js"".
Windows associated .js files with some other editors, so you have to disassociate this by typing:
assoc .js=JSFILE
After doing this, just run the add platform ("cordova platform add android") command again and it should work fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With