Unable to solve Android target error in Meteor add-platform android

I using a Macbook Pro M1 and decided to do start developing mobile app using Meteorjs framework, since I’ve used the framework for web development. I’ve followed a tutorial online on how to get that going but currently facing a problem:

Your system does not yet seem to fulfill all requirements to build apps for Android.

Please follow the installation instructions in the mobile guide:

Status of the individual requirements:
✓ Java JDK
✓ Android SDK
✗ Android target: android: Command failed with exit code 1
✓ Gradle

It seems that there’s only one requirement that failed, and I’ve searched for the solution but couldn’t find anything that resembles a similar problem that I’m facing. Hoping for you to help point me to the right direction.

I have installed the Android Studio, uninstalled and reinstalled the Android SDK Build-Tools 32, Android SDK Command-line Tools, Android SDK Platform-Tools, and Android Emulator.

and I’ve got Gradle working just fine. Tested building a generic Android app using one of the samples in Android Studio. The build was successful.

But I can’t get the meteor add-platform android to pass the checks. Anyone?

Hi @muhammadpedalme,

I was doing some tests on my M1, and it is giving basically the same error as you had.
My error is: Android target: Command failed with ENOENT: avdmanager list target spawn avdmanager ENOENT
It’s working fine with iOS btw

I’m investigating what is causing this issue, but I think it’s related to some version or misconfiguration on the PATH.

Hi @muhammadpedalme,

  • In order to make it work, you need to set up those PATHs in your .bashrc or .zshrc file

export ANDROID_HOME=$HOME/Library/Android/sdk
export ANDROID_SDK_ROOT=${ANDROID_HOME}
export PATH=${PATH}:${ANDROID_HOME}/emulator
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

I hope that helps

1 Like