我正在尝试在Ubuntu系统上运行Android模拟器。我是企业代理的幕后黑手,这可能会导致我的问题。我不确定,因为错误对我来说意义不大(我是Android的新手)。有人可以帮忙吗?
cordova run android
BUILD SUCCESSFUL
Total time: 2.588 secs
Built the following apk(s):
/home/david/projects/cordova-test/platforms/android/build/outputs/apk/android-debug.apk
ANDROID_HOME=//home/david/Android/Sdk
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
No target specified and no devices found, deploying to emulator
Error: android: Command failed with exit code 1 Error output:
Exception in thread "main" java.lang.NullPointerException
at java.io.File.<init>(File.java:277)
at com.android.sdklib.internal.avd.AvdManager.parseAvdInfo(AvdManager.java:1623)
at com.android.sdklib.internal.avd.AvdManager.buildAvdList(AvdManager.java:1584)
at com.android.sdklib.internal.avd.AvdManager.<init>(AvdManager.java:357)
at com.android.sdklib.internal.avd.AvdManager.getInstance(AvdManager.java:380)
at com.android.sdkmanager.Main.getAvdManager(Main.java:295)
at com.android.sdkmanager.Main.displayAvdList(Main.java:1185)
at com.android.sdkmanager.Main.doAction(Main.java:321)
at com.android.sdkmanager.Main.run(Main.java:151)
at com.android.sdkmanager.Main.main(Main.java:117)
尝试运行时也遇到类似的错误
来自Android / Sdk / tools目录的./android sdk
:
david@david-Virtual-Machine:~/Android/Sdk/tools$ ./android sdk
java.lang.NullPointerException
at java.io.File.<init>(File.java:277)
at com.android.sdklib.internal.avd.AvdManager.parseAvdInfo(AvdManager.java:1623)
at com.android.sdklib.internal.avd.AvdManager.buildAvdList(AvdManager.java:1584)
at com.android.sdklib.internal.avd.AvdManager.<init>(AvdManager.java:357)
at com.android.sdklib.internal.avd.AvdManager.getInstance(AvdManager.java:380)
at com.android.sdklib.internal.repository.updater.UpdaterData.initSdk(UpdaterData.java:259)
at com.android.sdklib.internal.repository.updater.UpdaterData.<init>(UpdaterData.java:127)
at com.android.sdkuilib.internal.repository.SwtUpdaterData.<init>(SwtUpdaterData.java:61)
at com.android.sdkuilib.internal.repository.ui.SdkUpdaterWindowImpl2.<init>(SdkUpdaterWindowImpl2.java:104)
at com.android.sdkuilib.repository.SdkUpdaterWindow.<init>(SdkUpdaterWindow.java:88)
at com.android.sdkmanager.Main.showSdkManagerWindow(Main.java:408)
at com.android.sdkmanager.Main.doAction(Main.java:377)
at com.android.sdkmanager.Main.run(Main.java:151)
at com.android.sdkmanager.Main.main(Main.java:117)