Import PhoneGap project into Android Studio

I have great difficulty importing the PhoneGap project into Android Studio. I tried many different ways that I found on many sites, but none of them work.

For example, I created a new project using Cordoba on the command line as follows:

$ cordova create hello com.example.hello "hello_world"

$ cd hello

$ cordova platform add android

(I tried using phoneGap commands instead of cordova, it didn't work either)

Then in Android Studio, I go to the file-> import project, and I tried to select the "hello" directory as well as the "platform / android". none of them worked, Android Studio tells me that this project is not a graddle based project

Other issues that I encountered use various methods found on the Internet:

  • Hello project is not a Gradle project

  • Android

  • : org.apache.cordova

, - ( :)) , , ,

:

  • Android Studio 1.1.0

  • 4.3.0

  • Sdk/tools Sdk/build-tools PATH, JAVA_HOME

+4
3

: hello, , . ( Gradle)

, . , Android , android com.example.hello . ok.

+1

: Android Studio , , "Gradle -enabled".

: 5.4.1 ( npm ..) .

" android" gradle.zip . "" Android Studio, .

: ...

" "

" "

^ 2: Android Studio (1.5.1). ...

0

Just import the project directly into Android Studio (File -> Import) and it will tell you that this is not a Gradle based project, and you should get something like this:

enter image description here

After you click next, it will generate all the necessary Gradle files.

-1
source

Source: https://habr.com/ru/post/1583817/


All Articles