Reputation: 1008
Trying to build my android project using
react-native run-android
But, I keep getting this same error:
Warning: License for package Android SDK Platform 26 not accepted.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> You have not accepted the license agreements of the following SDK
components:
[Android SDK Platform 26, Android SDK Build-Tools 26.0.2].
Before building your project, you need to accept the license agreements and
complete the installation of the missing components using the Android Studio
SDK Manager.
Alternatively, to learn how to transfer the license agreements from one
workstation to another, go to http://d.android.com/r/studio-ui/export-
licenses.html
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --
debug option to get more log output.
BUILD FAILED
What I have tried:
sdkmanager --licenses
to accept all licensesgit clean -d -fx
How do I fix this?
Upvotes: 1
Views: 587
Reputation: 1166
I suggest you build this React-native app by Android Studio.
Use Android Studio open Android project in folder /android
of your project.
After project open Android Studio will suggest "update"
, need skip
.
With dialog for download SDK, you accept and continue
.
When finish setup you can build your RN Android by menu Build\Build APK
or direct run app by menu Run\Run App
Upvotes: 1