Cordova 3.5.0 Install Error- Please Install Android Target 19

前端 未结 6 867
感情败类
感情败类 2020-11-28 04:05

I try to get this working and it\'s driving me nuts:

$ cordova platform add android

The output is:

Creating android project         


        
相关标签:
6条回答
  • 2020-11-28 04:19

    I too was getting the same error 19. I have no idea about AndroidManifest.xml and where it is supposed to be.

    In my case, I fixed the error by running the 'android' command from the console, opening the Android 4.4.2 (API19) tree and installing the SDK Platform.

    After this was installed the cordova platform add android command worked as desired.

    Further to this I had to install a few other elements of API19 to be able to create an android emulator:

    • ARM EABI v7a System Image
    • Intel x86 Atom System Image
    • Google APIs (x86 System Image)
    • Google APIs (ARM System Image)

    I could then create an emulator based on API19 using the Android Virtual Device (AVD) Manager that is included in the android SDK bundle.

    0 讨论(0)
  • 2020-11-28 04:21

    Android SDK is not your target Android version. Target Android version 19 is the API level for android Kitkat.So in you SDK manager check if you have Android 4.4.2(API 19) installed. If you want your target API version to be different then change it in ANdroidManifest.xml

    <uses-sdk
        android:minSdkVersion="16"
        android:targetSdkVersion="18" />
    

    Edit these lines. Here android:targetSdkVersion is your Android version that you are targeting.

    enter image description here

    0 讨论(0)
  • 2020-11-28 04:23

    1) Went into the SDK Manager (typing android into the terminal, assuming it's in your file path)

    2) Selected box next to Android 4.4.2 (API 19)

    3) Clicked button Install 8 packages

    4) Ran original command (in this example cordova platform add android, although it could be ionic platform add android, depending on what you're working with)

    0 讨论(0)
  • 2020-11-28 04:33

    If your having issues installing the package, ensure you are running 'Android Central' as an administrator... took me 30 mins to work it out!!

    0 讨论(0)
  • 2020-11-28 04:34

    I also had to change project.properties in the same directory

    target=android-19
    android.library.reference.1=CordovaLib
    
    0 讨论(0)
  • 2020-11-28 04:42

    Here is documentation on how you set up an AndroidManifest.xml document. Every app should have one.

    http://developer.android.com/guide/topics/manifest/manifest-intro.html

    0 讨论(0)
提交回复
热议问题