PANIC: Cannot find AVD system path. Please define ANDROID_SDK_ROOT

后端 未结 6 994
旧巷少年郎
旧巷少年郎 2020-12-28 12:06

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\\MA         


        
6条回答
  •  北荒
    北荒 (楼主)
    2020-12-28 12:43

    I had the same problem and none of the answers here solved my issue, I think the reason in my case was either Ionic framework or and most probably Native Script framework. Native Script uses the Android Studio emulator to link to their mobile apps so they change the Andriod Studio emulator's path. What I did to solve the issue:

    1.Unistall Ionic, Cordova, and Native Script - I'm not sure if this step is necessary

    2- Uninstall Android Studio and deleting the folder Android in AppData/Local folder

    3- Install Andriod Studio and make sure not to import settings

    1- Unistall Ionic, Cordova, and Native Script I'm not sure if this step is necessary

    For Window system

    npm uninstall -g ionic
    npm uninstall -g cordova
    npm uninstall -g nativescript
    

    2- Uninstall Android Studio

    • Uninstall Android Studio from control panel
    • Delete the folder users/${yourUserName}/appData/Local/Android (Show hidden files to see appData folder)

    3- Reinstall Android Studio

    • Make sure not to import settings

    After that you might want to install the frameworks again, I did not

提交回复
热议问题