no ABI error , when creating an Android virtual de

2019-01-16 16:32发布

问题:

I am getting a No ABI error when creating a virtual device. My setup includes

Android SDK

ADT plugin

Eclipse

when I run

 android list targets

it gives me

  Name: Android 4.0.3
  Type: Platform
  API level: 15
  Revision: 2
  Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720,
  WXGA800
 ABIs : no ABIs.

and when I try to run

  android create avd -n myandroid -t 1

it gives

  This platform has more than one ABI. Please specify one using --abi.

how do I specify ABI and hence create an AVD

回答1:

Find the ABI relative to your android version:

android list sdk --extended --no-ui --all

Install ABI:

echo "y" | android update sdk -a --no-ui --filter sys-img-armeabi-v7a-android-22,sys-img-x86_64-android-22

Create AVD:

echo "n" | android create avd --name myandroid22 -t "android-22"

If you have more than one, list and find valid ABI:

android list targets

Create AVD:

echo "n" | android create avd --name myandroid22 -t "android-22" --abi "default/armeabi-v7a"


回答2:

Use the command tools/android to fire up the Android SDK Manager and install the ABI's from there.



回答3:

Use "android list targets" to get a list of possible target configurations.

When using the command to create a virtual device use -t to specify the id from the list and -b to specify the ABI. You can see that in the result for the "list target" command.

$ android create avd -n my_android1.1 -t 1 -b default/x86
$ android list target

----------
id: 1 or "android-19"
     Name: Android 4.4.2
     Type: Platform
     API level: 19
     Revision: 4
     Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in
 Tag/ABIs : default/armeabi-v7a, default/x86
----------
id: 2 or "android-20"
     Name: Android 4.4W.2
     Type: Platform
     API level: 20
     Revision: 2
     Skins: HVGA, QVGA, WQVGA400, WQVGA432, WSVGA, WVGA800 (default), WVGA854, WXGA720, WXGA800, WXGA800-7in
 Tag/ABIs : no ABIs.
----------