I get the above error when I updated Android Gradle plugin to version 2.3.0 and Gradle to version 3.3.
Here is my Gradle script 1:
buildscript {
repositories {
jcenter()
maven { url 'example.com' }
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
classpath 'com.github.JakeWharton:sdk-manager-plugin:220bf7a88a7072df3ed16dc8466fb144f2817070'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.0'
}
}
subprojects {
repositories {
jcenter()
mavenLocal()
}
version = '3.4.0'
group = 'com.journeyapps'
apply plugin: 'android-sdk-manager'
ext.androidBuildTools = '23.0.2'
ext.androidTargetSdk = 23
ext.zxingCore = 'com.google.zxing:core:3.2.1'
}
Go to File > Project Structure in Android Studio. Select the app module in the Modules list on the left. Select the Dependencies tab. Click the + button on the lower left to add the dependency.
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.
Android Studio uses Gradle, an advanced build toolkit, to automate and manage the build process, while allowing you to define flexible custom build configurations. Each build configuration can define its own set of code and resources, while reusing the parts common to all versions of your app.
The app level build. gradle file is located inside your project folder under app/build. gradle.
Remove this line from gradle file
apply plugin: 'android-sdk-manager'
This one work for me.
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