Hello people.
I’m working on a project with Ionic V4 for the first time. I want to run my app on an emulator and it keeps giving this error:
ERR_SDK_NOT_FOUND: No valid Android SDK root found.
I’ve tried running with various commands: native-run android, ionic cordova run android, ionic cordova run android --no-native-run, ionic run android but they all give the same error.
I ran ionic cordova requirements and I have all requirements (JDK, SDK, gradle) installed.
I need help with this and will appreciate any/all suggestions as this is quite urgent.
It’s my first time with ionic and I have the same problem. I can build the apk with “ionic Cordova build android” but I can’t run on a device with “ionic Cordova run android --device”.
All time gets a message error:
[native-run] ERR_SDK_NOT_FOUND: No valid Android SDK root found.
[ERROR] An error occurred while running subprocess native-run.
I just had this same problem. Manually running the command that the ionic CLI was failing on with a --verbose tag lead me to an iffy solution that works.
native-run was looking for the SDK at $HOME/Android/sdk
However, my SDK was stored at $HOME/Android/Sdk
I’m sure there’s a correct way to fix this problem. But as a bandaid for right now I just made a copy of the Sdk directory and put it in a directory called sdk.