本文介绍了紧急:找不到AVD系统路径.请定义ANDROID_SDK_ROOT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试运行我的第一个Ionic应用程序,但是却出现此错误,它找不到我的手机,也没有找到要运行的模拟器.

I'm trying to run my first Ionic app but i'm getting this error where it does not find my phone and does not find the emulator to run either.

C:\Users\MART\Dropbox\Ionic\myapp>ionic run android
Running command: "C:\Program Files\nodejs\node.exe" C:\Users\MART\Dropbox\Ionic\myapp\hooks\after_prepare\010_add_platform_class.js C:\Users\MART\Dropbox\Ionic\myapp

add to body class: platform-android

ANDROID_HOME=C:\Users\MART\Dropbox\Ionic\adt-bundle-windows-x86_64-20140702\sdk

JAVA_HOME=C:\Program Files\Java\1.8.0_20\jdk1.8.0_20

Subproject Path: CordovaLib

Incremental java compilation is an incubating feature.

:preBuild UP-TO-DATE
:preDebugBuild UP-TO-DATE
:checkDebugManifest
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugAidl UP-TO-DATE
:CordovaLib:compileDebugNdk UP-TO-DATE
:CordovaLib:compileLint UP-TO-DATE
:CordovaLib:copyDebugLint UP-TO-DATE
:CordovaLib:mergeDebugShaders UP-TO-DATE
:CordovaLib:compileDebugShaders UP-TO-DATE
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugProguardFiles UP-TO-DATE
:CordovaLib:packageDebugRenderscript UP-TO-DATE
:CordovaLib:compileDebugRenderscript UP-TO-DATE
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources UP-TO-DATE
:CordovaLib:processDebugManifest UP-TO-DATE
:CordovaLib:generateDebugBuildConfig UP-TO-DATE
:CordovaLib:processDebugResources UP-TO-DATE
:CordovaLib:generateDebugSources UP-TO-DATE
:CordovaLib:incrementalDebugJavaCompilationSafeguard UP-TO-DATE
:CordovaLib:compileDebugJavaWithJavac UP-TO-DATE
:CordovaLib:processDebugJavaRes UP-TO-DATE
:CordovaLib:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug UP-TO-DATE
:CordovaLib:mergeDebugJniLibFolders UP-TO-DATE
:CordovaLib:transformNative_libsWithMergeJniLibsForDebug UP-TO-DATE
:CordovaLib:transformNative_libsWithSyncJniLibsForDebug UP-TO-DATE
:CordovaLib:bundleDebug UP-TO-DATE
:prepareAndroidCordovaLibUnspecifiedDebugLibrary UP-TO-DATE
:prepareDebugDependencies
:compileDebugAidl UP-TO-DATE
:compileDebugRenderscript UP-TO-DATE
:generateDebugBuildConfig UP-TO-DATE
:generateDebugResValues UP-TO-DATE
:generateDebugResources UP-TO-DATE
:mergeDebugResources UP-TO-DATE
:processDebugManifest UP-TO-DATE
:processDebugResources UP-TO-DATE
:generateDebugSources UP-TO-DATE
:incrementalDebugJavaCompilationSafeguard UP-TO-DATE
:compileDebugJavaWithJavac UP-TO-DATE
:compileDebugNdk UP-TO-DATE
:compileDebugSources UP-TO-DATE
:mergeDebugShaders UP-TO-DATE
:compileDebugShaders UP-TO-DATE
:generateDebugAssets UP-TO-DATE
:mergeDebugAssets UP-TO-DATE
:transformClassesWithDexForDebug UP-TO-DATE
:mergeDebugJniLibFolders UP-TO-DATE
:transformNative_libsWithMergeJniLibsForDebug UP-TO-DATE
:processDebugJavaRes UP-TO-DATE
:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
:validateSigningDebug
:packageDebug UP-TO-DATE
:assembleDebug UP-TO-DATE
:cdvBuildDebug UP-TO-DATE
BUILD SUCCESSFUL
Total time: 4.105 secs

Built the following apk(s):
        C:/Users/MART/Dropbox/Ionic/myapp/platforms/android/build/outputs/apk/android-debug.apk

ANDROID_HOME=C:\Users\MART\Dropbox\Ionic\adt-bundle-windows-x86_64-20140702\sdk

JAVA_HOME=C:\Program Files\Java\1.8.0_20\jdk1.8.0_20

No target specified and no devices found, deploying to emulator


No emulator specified, defaulting to Nexus

Waiting for emulator to start...

PANIC: Cannot
 find AVD system path. Please define ANDROID_SDK_ROOT

............................................... .....................................

...........................................................................

我已将此安装在我的android管理器中

I have this installed in my android manager

推荐答案

当我在Windows上运行ionic 2应用程序( ionic run android )时,我遇到了同样的问题,请按照以下说明解决问题步骤,希望对您有帮助.

I have same issue when I run my ionic 2 app on windows (ionic run android), and I solve it by following these steps, hope it will help you.

1-启动您的 Android Studio .

2-创建一个新项目,以便能够创建或删除虚拟设备.

2- Create a New Project to be able to create or delete virtual devices.

3-删除所有虚拟设备(如果找到).

3- Delete any virtual devices if found.

4-,然后通过 AVD管理器创建虚拟设备,如下所示.

4- and create virtual device via AVD manager as shown below .

这篇关于紧急:找不到AVD系统路径.请定义ANDROID_SDK_ROOT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 01:17