The org.apache.cordova package does not exist.

Hi guys, thanks for reading :) I am using apache cordova for the application, so I did the whole step to build in terminal: "corova build android", it works fine, when I use "rootova runroid", it works again, opens the simulator and I can test the application. But when I want to build with android studio, to generate signed apk I have this error: package org.apache.cordova does not exist

The error comes from the src / fr.myapp.myapp / MainActivity folder: import org.apache.cordova.*;

How can I add this package or fix a bug? I searched on stackoverflow.com and another forum, but no one gave the correct answer: /

Thank you so much!

* Please note that when I am building on ios I have no errors and it works fine

+3


source to share


1 answer


You only imported your apps. Non-library projects.

Steps to import a Phonegap project:

  • Importing a project (Eclipse, ADT, etc.)

  • Select your project from directory (don't select android directory, select whole project then only all cordova libs will be imported enter image description here

Check if this dialog fails (if not, no problem) enter image description here



  1. If so, make sure you select all libraries.enter image description here

For step 2, if you don't get the dialog, click Next and open your project. In this File-> Import Module again import all libraries.

Guess I'm clear.

+2


source







All Articles