gpt4 book ai didi

android - Cordova 错误 : No emulator images (avds) found

转载 作者:行者123 更新时间:2023-11-30 00:07:29 24 4
gpt4 key购买 nike

所以我尝试为我的 ionic 应用程序使用 android 模拟器,因为我需要试用 sqlite,这在他们的网络服务器方法中是不可能的。

无论如何。我的工作:

cd 我的项目

ionic cordova build android => 成功

ionic cardova 模拟 android

   BUILD SUCCESSFUL in 1s
47 actionable tasks: 1 executed, 46 up-to-date
Built the following apk(s):
/home/foo/testApp/platforms/android/app/build/outputs/apk/debug/app-debug.apk

ANDROID_HOME=/opt/android-sdk
JAVA_HOME=/usr/lib/jvm/java-8-openjdk
[17:34:24] lint finished in 3.58 s
(node:1425) UnhandledPromiseRejectionWarning: CordovaError: No emulator images (avds) found.
1. Download desired System Image by running: /opt/android-sdk/tools/android sdk
2. Create an AVD by running: /opt/android-sdk/tools/android avd
HINT: For a faster emulator, use an Intel System Image and install the HAXM device driver

at /home/foo/testApp/platforms/android/cordova/lib/emulator.js:288:29
at _fulfilled (/home/foo/testApp/platforms/android/cordova/node_modules/q/q.js:854:54)
at self.promiseDispatch.done (/home/foo/testApp/platforms/android/cordova/node_modules/q/q.js:883:30)
at Promise.promise.promiseDispatch (/home/foo/testApp/platforms/android/cordova/node_modules/q/q.js:816:13)
at /home/foo/testApp/platforms/android/cordova/node_modules/q/q.js:624:44
at runSingle (/home/foo/testApp/platforms/android/cordova/node_modules/q/q.js:137:13)
at flush (/home/foo/testApp/platforms/android/cordova/node_modules/q/q.js:125:13)
at process._tickCallback (internal/process/next_tick.js:150:11)
(node:1425) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:1425) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

还有:

$ avdmanager list avd
Parsing /opt/android-sdk/build-tools/27.0.3/package.xmlParsing /opt/android-sdk/extras/android/m2repository/package.xmlParsing /opt/android-sdk/extras/google/m2repository/package.xmlParsing /opt/android-sdk/extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.2/package.xmlParsing /opt/android-sdk/extras/m2repository/com/android/support/constraint/constraint-layout/1.0.2/package.xmlParsing /opt/android-sdk/patcher/v4/package.xmlParsing /opt/android-sdk/platform-tools/package.xmlParsing /opt/android-sdk/platforms/android-26/package.xmlParsing /opt/android-sdk/platforms/android-27/package.xmlParsing /opt/android-sdk/sources/android-27/package.xmlParsing /opt/android-sdk/system-images/android-23/google_apis/x86/package.xmlParsing /opt/android-sdk/system-images/android-25/google_apis/x86/package.xmlParsing /opt/android-sdk/tools/package.xmlAvailable Android Virtual Devices:
Name: test
Device: Nexus 4 (Google)
Path: /home/foo/.android/avd/test.avd
Target: Google APIs (Google Inc.)
Based on: Android 6.0 (Marshmallow) Tag/ABI: google_apis/x86
Sdcard: 100M
---------
Name: test123
Path: /home/foo/.android/avd/test123.avd
Target: Google APIs (Google Inc.)
Based on: Android 7.1.1 (Nougat) Tag/ABI: google_apis/x86
---------
Name: test2
Path: /home/foo/.android/avd/test2.avd
Target: Google APIs (Google Inc.)
Based on: Android 7.1.1 (Nougat) Tag/ABI: google_apis/x86
---------
Name: test3
Path: /home/foo/.android/avd/test3.avd
Target: Google APIs (Google Inc.)
Based on: Android 7.1.1 (Nougat) Tag/ABI: google_apis/x86
---------
Name: thename
Path: /home/foo/.android/avd/thename.avd
Target: Google APIs (Google Inc.)
Based on: Android 7.1.1 (Nougat) Tag/ABI: google_apis/x86
---------
Name: thename2
Path: /home/foo/.android/avd/thename2.avd
Target: Google APIs (Google Inc.)
Based on: Android 7.1.1 (Nougat) Tag/ABI: google_apis/x86

所以我有 avds - 不是吗?

有什么问题?

最佳答案

我认为您的路径不匹配。尝试明确指定 avd

关于android - Cordova 错误 : No emulator images (avds) found,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48733828/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com