Error creating Android application using Cordova 3.1 CLI command line

I am trying to run "cordova build android" through the CLI using a phone bookmark using a terminal on my Mac.

First I downloaded the Android SDK.

Then I installed the project and added android.

Then I tried to create an "android cordova build" and got the following error:

Error: An error occurred while creating the android project. please set Android Target 17 (new Android SDK). Make sure you have the latest Android tools also installed. Run "android" from your command line to install / update the missing SDK or tools.

So, I launched "android" and installed everything related to target 17.

Then I again tried to “build and build a cord” and get the following compilation errors:

-compile: [javac] Compiling 3 source files in /Users/johnmacadam/Desktop/com.test.hello/platforms/android/bin/classes [javac] /Users/johnmacadam/Desktop/com.test.hello/platforms/android /src/com/ZZZ.java:20: ';' the expected [javac] package com.humorthatworks.501ways; [javac] ^ [javac] /Users/johnmacadam/Desktop/com.test.hello/platforms/android/src/com/ZZZ.java:25: the expected [javac] public class 501Ways expands the capabilities of CordovaActivity [javac] ^ [javac ] /Users/johnmacadam/Desktop/com.test.hello/platforms/android/src/com/ZZZ.java:25: the expected [javac] public class ZZZ extends CordovaActivity [javac] ^ [javac] / Users / johnmacadam / Desktop / com.test.hello / platforms / android / src / com / ZZZ.java: 25:the expected [javac] public class ZZZ extends the capabilities of CordovaActivity [javac] ^ [javac] /Users/johnmacadam/Desktop/com.test.hello/platforms/android/gen/com/ZZZ/BuildConfig.java:2: ';' expected [javac] package com.ZZZ; [javac] ^ [javac] /Users/johnmacadam/Desktop/com.test.hello/platforms/android/gen/com/ZZZ/R.java:8: ';' expected [javac] package com.ZZZ; [javac] ^ [javac] 6 errors

/Users/johnmacadam/Documents/adt -bundle/sdk/tools/ ant/build.xml:720: : /Users/johnmacadam/Documents/adt -bundle/sdk/tools/ant/build.xml:734: ; . .

/?

+2
3

config.xml .

: com.42myapp.test com.myapp.42test , 42com.myapp.test. .

Android, iOS .

+6

, ... Java .

0

In my case, I use the Ionic Framework , I forgot about the Java sentences for the package name, and I made a mistake when using the identified ones _200for my project:

ionic start _200

Hapilly, starting a new project with the correct package ID worked just fine:

ionic start blah
0
source

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


All Articles