I am using apache cordova to make an application, so I have done all the steps for build in terminal: 'cordova build android', it works perfectly. When I use 'cordova run android', it works again, opens the simulator and I can test the app. But when I want to build it with android studio, for making a signed apk, I have this error:
package org.apache.cordova does not exist
The error is coming from the folder src/fr.myapp.myapp/MainActivity: import org.apache.cordova.*;.
How can I add this package or fix the error?
Note that when I build on ios, I have no error and it works perfectly.
You have imported only your applications. Not the library projects.
Steps to import Phonegap project :
Import Project(Eclipse,ADT etc)
Select your project from the directory(Do not select Android directory, select will the whole project, then only all the cordova libs will be imported

Check whether you get this dialog(If not, not a prob)

For Step 2, if you didnt get the dialog, click next and open your project. In that File-> Import Module to import all the libraries again.
Guess I'm clear
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