Issue
This Content is from Stack Overflow. Question asked by Mohammed Tawfik
When I try to build the application on android the gradle failed with the error:
No variants found for ‘:mauron85_react-native-background-geolocation’. Check build files to ensure at least one variant exists.
Solution
using this properties in variables.gradle the message disappear, compile successfully and work
ext {
minSdkVersion = 21
compileSdkVersion = 30
targetSdkVersion = 30
androidxActivityVersion = '1.2.0'
androidxAppCompatVersion = '1.2.0'
androidxBrowserVersion = '1.3.0'
androidxLocalbroadcastmanagerVersion = '1.0.0'
androidxCoordinatorLayoutVersion = '1.1.0'
androidxCoreVersion = '1.3.2'
androidxFragmentVersion = '1.3.0'
playServicesLocationVersion = '17.0.0'
junitVersion = '4.13.1'
androidxJunitVersion = '1.1.2'
androidxEspressoCoreVersion = '3.3.0'
cordovaAndroidVersion = '7.0.0'
}
or update to v1.0.3 version
This Question was asked in StackOverflow by Mohammed Tawfik and Answered by Iva It is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.