I have a similar problem to this:
CordovaActivity cannot be resolved to a type in Phonegap 3.4.
Means, in the main class, CordovaActivity
cannot be resolved to a type.
However, I downloaded Cordova Android Zip from here (as explained in the comments): https://github.com/apache/cordova-android.
And included cordova-2.2.0.jar
from ./lib/android
to my build path.
The line:
import org.apache.cordova
works fine now, but still, it does not find any class called CordovaActivity
for extension.
Which I prove by:
grep -r "CordovaActivity" *
on the unpacked cordova-2.2.0.jar
folder.
What is wrong here?
besides that, there seems to be a package problem:
the main java file is located in ./src/com/testapp/test2
, in line 20 it says after I call cordova -d build
:
package com.testapp.test;
with a red underline, that only disappears after I add src.
before com.testsapp.test2
. However, that gets crushed with every time I call cordova -d build
. If I correct the path in the config.xml from
<widget id="com.testapp.test2" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
to
<widget id="src.com.testapp.test2" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
I will have a new package in my package explorer: src.src.com.testapp.test2
, having the same problem.
That seems really weird.