I have a React Native app I'm trying to deploy to an Android Studio's Android emulator, on Windows 10.
I run the app from an elevated Power Shell, using
react-native run-android
The Metro Bundler console opens, but the build fails with the following message:
Could not resolve all files for configuration ':react-native-audio:debugCompileClasspath'.
Could not find com.android.support:appcompat-v7:${supportVersion}. Required by: project :react-native-audio
I have:
- React Native v0.59.10
- Node v10.16.3
- Android Studio v3.5
Gradle:
buildToolsVersion = "28.0.3"
minSdkVersion = 16
compileSdkVersion = 28
targetSdkVersion = 28
supportLibVersion = "28.0.0"
classpath 'com.android.tools.build:gradle:3.3.1'
I have tried changing to classpath 'com.android.tools.build:gradle:3.2.1'
as per the advice from github, but that only resulted in a different error:
A problem occurred configuring project ':app'.
Could not get unknown property 'mergeResourcesProvider' for object of type com.android.build.gradle.internal.api.ApplicationVariantImpl.