Cordova 2.7 project can't be compiled
android, cordova
Solution
In project properties > Java Build Path > Libraries, I added this using the "Add External JARs..." button. All the build errors disappeared but I can't run the application.
Undo that. Put `cordova-2.7.0.jar` in your project's `libs/` directory instead. That will not only add it to your build path, but it will also package the JAR's contents into your APK, which "Add External JARs..." does not.
As to why this JAR was not automatically put in `libs/` for you when you created the project, that I can't answer, as I have not tried 2.7.
Problem
I have followed the instructions at http://cordova.apache.org/docs/en/edge/guide_getting-started_android_index.md.html#Getting%20Started%20with%20Android and as per the guide I have a "red x" on my project; I followed the instructions to clean build but nothing changed. I receive the following 5 errors ``` The import org.apache.cordova cannot be resolved Bathurst.java /Bathurst/src/com/aligma/bathurst line 23 Java Problem DroidGap cannot be resolved to a type Bathurst.java /Bathurst/src/com/aligma/bathurst line 25 Java Problem The method onCreate(Bundle) of type Bathurst must override or implement a supertype method Bathurst.java /Bathurst/src/com/aligma/bathurst line 28 Java Problem DroidGap cannot be resolved to a type Bathurst.java /Bathurst/src/com/aligma/bathurst line 30 Java Problem Config cannot be resolved Bathurst.java /Bathurst/src/com/aligma/bathurst line 32 Java Problem ``` The generated file with the issues above follows ``` package com.aligma.bathurst; import android.os.Bundle; import org.apache.cordova.*; public class Bathurst extends DroidGap { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Set by <content src="index.html" /> in config.xml super.loadUrl(Config.getStartUrl()); //super.loadUrl("file:///android_asset/www/index.html") } } ``` So that's where I'm stuck at the moment. In the meantime I managed to build a cordova-2.7.0.jar. In project properties > Java Build Path > Libraries, I added this using the "Add External JARs..." button. All the build errors disappeared but I can't run the application. Looking for ideas as to what I can do next.