I can’t run my project in Android emulator using Android studio.
error message: Couldn’t start project on Android: The system cannot find the path specified
I checked the expo-cli code to see what’s happening. Adb.exe is being located in this method in @expo/xdl project.
function whichADB() {
if (process.env.ANDROID_HOME) {
return `${process.env.ANDROID_HOME}/platform-tools/adb`;
}
return 'adb';
}
As you can see the ANDROID_HOME variable must point to your SDK or be not set. But in this case adb.exe location must be set in PATH.
Newer ANDROID_SDK_ROOT is completely ignored (see. 環境變數 | Android Developers).
I managed to solved the problem.
check your ANDROID_HOME variable in advance system setting. It must point to your SDK C:\Users%yourPC%\AppData\Local\Android\Sdk