Error:Cause: com.android.sdklib.repository.FullRevision - android

I wanted to try instant-run from AS 2.0 - for this to work I had to update to build-plugin to 2.0.0-alpha6 - but when doing this I cannot gradle-sync the project anymore as I am getting:
Gradle 'myProject' project refresh failed
Error:Cause: com.android.sdklib.repository.FullRevision
Anyone knows the reason/workaround for this?
I use JakeWharton/sdk-manager-plugin.
build-plugin to 1.5.0 is not problem.

In my project I have added
apply plugin: 'android-sdk-manager'
I removed it from the gradle file of App & it worked.
Hope will help you.

In my case I had to mark out 'apply plugin: 'android-sdk-manager' from the project's 'build.gradle' file. Obviously, environment and project's configurations vary, however, marking it out and allowing
dependencies{
.....
classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.10+'
}
handle the plugin resolved this issue.

Related

Gradle DSL method not found: 'deleteAllActions()'

I cloned this project from github and imported it using android studio but after doing all the rounds I'm getting this error
ERROR: Gradle DSL method not found: 'deleteAllActions()'
Can anyone help me remove this error and build the project well?
You should update the version of the Retrolambda plugin. Currently, that would be 3.7.1.
So in your project's build.gradle file, make sure that you have this line:
classpath 'me.tatarka:gradle-retrolambda:3.7.1'
if you are using below dependency for multiple image selection functionality.
react-native-multiple-image-picker
then remove the below line from build.gradle of the same library.
apply plugin: 'me.tatarka.retrolambda'
If you're trying to open the project on Android Studio 3.4.x, then update your android studio to 3.5.1 and re-clone the same project. I had the same issue and after updating, it built the project successfully!
Edit: This is happening specifically when gradle is updated to 5.4.1
To stop this from happening, change this line inbuild.gradle file :
classpath 'com.android.tools.build:gradle:3.5.1'
To this :
classpath 'com.android.tools.build:gradle:2.2.2'
And change this line in gradle-wrapper.properties :
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
To this :
distributionUrl=https\://services.gradle.org/distributions/gradle-3.2.1-bin.zip
Then sync and it will successfully sync the project
Remove dependency me.tatarka:gradle-retrolambda from build.gradle in data module.

WARNING: API 'variant.getExternalNativeBuildTasks()' is obsolete and has been replaced with 'variant.getExternalNativeBuildProviders()'

Unable to resolve this warning. How can I resolve this?
variant.getExternalNativeBuildTasks()' is obsolete and has been replaced with
variant.getExternalNativeBuildProviders()
Just update Fabric gradle plugin to 1.28.0
dependencies {
classpath 'io.fabric.tools:gradle:1.28.0'
}
Add this android.debug.obsoleteApi=true to the gradle.properties file. And make gradle clean, sync and then build an APK. Worked for me. I have Android Studio 3.3 and Gradle version 4.10.1.
For more information check this link out: Android Gradle plugin release notes.
I agree with other contributors: Fabric causes this error.
UPDATE
Check Valdislav Panchenko's answer:
Now you can just update your Fabric plugin to 1.28.0 as follows:
dependencies {
classpath 'io.fabric.tools:gradle:1.28.0'
}
Most likely it's caused by Fabric's plugin needed for Crashlytics.
Commenting out apply plugin: 'io.fabric' resolves the issue. So the only option is to wait until Google devs will fix Fabric's plugin.
It's caused by one of the Gradle plugins used in your project.
Check build.gradle file and try to remove apply plugin: xxx one by one to understand exactly which plugin is causing the warning.
In our project it was apply plugin: 'io.fabric' after Google update Android Studio to 3.3 yesterday.
It happened to me but I needed to continue with the Fabric plugin.
For those who need to keep the Fabric plugin applied, the temporary solution is to go back to the previous version of the gradle at the project level.
Change the classpath version to com.android.tools.build:gradle:3.2.1.
For those who are facing this problem eventhough they dont use fabric, forget about Vitaly Zeyenko's updated answer above and simply go to the gradle folder of your project and open the gradle.properties file and add this line -->>> android.debug.obsoleteApi=true to it...
After that, Clean and rebuild project... This is a better solution than on the command line because a lot of people already have the JDK environment set to wrong locations on their computer and might face more problems solving this issue through the command line

cannot apply 'android-reporting' in gradle file

When I put apply plugin: 'android-reporting' in my project level build.gradle file as suggested here, gradle sync fails throwing
Caused by: java.lang.IllegalArgumentException: Cannot add extension with name 'android', as there is an extension already registered with that name.
Can somebody help what could be happening here. I am at latest version of gradle plugin.
You need to apply it at the end of the root build.gradle
I ran into this issue from applying an android plugin via an allPlugins block. If you change this to subprojects it might fix your issue

Android: How to update build.gradle?

I need gradle ver 2.1.4 so I tried changing
classpath 'com.android.tools.build:gradle:2.1.3'
to
classpath 'com.android.tools.build:gradle:2.1.4'
but it didn't work. I also tried this method http://devdeeds.com/update-gradle-plugin-android-studio/ but that didn't work either.
This is the error that I am getting
Error:Could not find com.android.tools.build:gradle:2.1.4. Searched in
the following locations:
file:/C:/Users/Reimu/Downloads/android-studio-ide-145.3200535-windows/android-studio/gradle/m2repository/com/android/tools/build/gradle/2.1.4/gradle-2.1.4.pom
file:/C:/Users/Reimu/Downloads/android-studio-ide-145.3200535-windows/android-studio/gradle/m2repository/com/android/tools/build/gradle/2.1.4/gradle-2.1.4.jar
https://jcenter.bintray.com/com/android/tools/build/gradle/2.1.4/gradle-2.1.4.pom
https://jcenter.bintray.com/com/android/tools/build/gradle/2.1.4/gradle-2.1.4.jar
Required by:
:MyApp:unspecified
I can't run any projects without this being updated apparently.
Any help is appreciated
The classpath 'com.android.tools.build:gradle:2.1.3' is not for Gradle itself, but the Gradle Android build plugin that you apply with the apply plugin: 'com.android.application' or apply plugin: 'com.android.library' in your module's build.gradle file.
If you want to use another version of gradle in your project, reconfigure your gradle wrapper. Search for the /gradle/wrapper/gradle-wrapper.properties file in your project root, and apply the correct distributionUrl, for example:
distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip
For the 2.14.1 version of gradle. This is probably what you need, because there is no such thing as Gradle v. 2.1.4. There is also no Android Gradle plugin v. 2.1.4.
And if it turns out, that you need the newest android grade build plugin, then change your class path to 'com.android.tools.build:gradle:2.2.0-beta2'. Version 2.1.3 is currently the newest stable version.

Can not add com.github.dcendents.android-maven

I tried to upload my code to bintry so that I can connect it to jcenter but the problem occurs when I add this line to my library build.gradle:
apply plugin: 'com.github.dcendents.android-maven'
gradle can not be build, what did I wrong?
I had the same issue. I was using gradle 2.4.
I don't know why but by downgrading gradle to 2.2.1 it get solved.
Just go to File then Project Settings and write in gradle field 2.2.1.

Categories

Resources