Here is the full error: failed to find target with hash string 'android-23' in: /Users/username/Library/Android/sdk
This is the build.gradle
file in my android/app
:
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.mobile"
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "1.0"
ndk {
abiFilters "armeabi-v7a", "x86"
}
}
I ran the Android SDK Manager, and I have the Android SDK Build-Tools
Rev 23.0.1 installed, along with all the files for Android 6.0 (API 23).
I searched online for this problem and have tried many solutions; restarting the terminal, deleting the gradle file in the root directory, making sure ANDROID_HOME points to the correct directory (As I am following the ReactNative docs, I have copied in both ~./bashrc
and ~./bash_profile
the following line:
# If you installed the SDK via Homebrew, otherwise ~/Library/Android/sdk
export ANDROID_HOME=/usr/local/opt/android-sdk
.
Nothing has worked for me so far and I keep getting the same error. I should add that everything was working fine until I installed Android Studio, after which point I started getting this error. I have since then uninstalled Android Studio naively thinking it would solve the problem.
Please help me SO, you're my only hope.