avishayil / react-native-restart

React Native Package With One Purpose: To Restart Your React Native Project
MIT License
926 stars 145 forks source link

Android: Failed to find target with hash string '28' in: /home/user/Android/Sdk #213

Closed SherMish closed 2 years ago

SherMish commented 2 years ago

I am having that error in my project after installing this library.

Also tried installing Android SDK 28 (Android Pie) in SDK Manager in android studio but i have the same problem

React Native 0.67.3

image

SherMish commented 2 years ago

I fixed it. The solution was converting the compileSdkVersion to int. i.e, at build.gradle(:react-native-restart) from compileSdkVersion safeExtGet('compileSdkVersion') To compileSdkVersion Integer.parseInt(safeExtGet('compileSdkVersion'))