I' am working on React Native technology and everything was working fine until yesterday and today when I opened react-native project in the android studio it gave me this error:
Error:Could not find method getCompileConfiguration() for arguments [] on object of type com.android.build.gradle.internal.api.ApplicationVariantImpl.
Please help me out with the best solution to resolve this issue.
Thanks
To add a dependency to your project, specify a dependency configuration such as implementation in the dependencies block of your module's build.gradle file.
Dependency injection (DI) is a technique widely used in programming and well suited to Android development. By following the principles of DI, you lay the groundwork for good app architecture. Implementing dependency injection provides you with the following advantages: Reusability of code. Ease of refactoring.
I think this is due to com.google.gms:google-services
released a new version that is not compatible with the gradle build tools, to fix it I changed android/build.gradle
dependencies {
- classpath 'com.android.tools.build:gradle:2.2.+'
- classpath 'com.google.gms:google-services:3.+'
+ classpath 'com.android.tools.build:gradle:2.2.3'
+ classpath 'com.google.gms:google-services:3.2.1'
}
To use strict versions, as per the docs here
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