I've setup the environment for react native on Windows. But when I run the command
react-native run-android
I get the following errors -
* What went wrong: A problem occurred configuring project ':app'. > Failed to notify project evaluation listener. > Could not initialize class com.android.sdklib.repository.AndroidSdkHandler
How do I fix this?
This is because your classpath build tools in build.gradle root project is deprecated. Update it like this
buildscript { repositories { google() mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:7.0.0' } }
and after that update your minimum sdk and build tools to latest and no problem again
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With