When I compile my Android Flutter application I get this error
Could not determine the dependencies of task ':app:processDebugResources'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
> Could not resolve org.tensorflow:tensorflow-lite:+.
Required by:
project :app > project :tflite
> Failed to list versions for org.tensorflow:tensorflow-lite.
> Unable to load Maven meta-data from https://google.bintray.com/exoplayer/org/tensorflow/tensorflow-lite/maven-metadata.xml.
> Could not get resource 'https://google.bintray.com/exoplayer/org/tensorflow/tensorflow-lite/maven-metadata.xml'.
> Could not GET 'https://google.bintray.com/exoplayer/org/tensorflow/tensorflow-lite/maven-metadata.xml'. Received status code 502 from server: Bad Gateway
Bintray is down for this https://google.bintray.com/exoplayer/org/tensorflow/tensorflow-lite/maven-metadata.xml
After this problem try to change the repository in android/build.gradle from Jcenter() to mavenCentral()
my android/build.gradle
buildscript {
repositories {
mavenCentral()
google()
//jcenter()
}
dependencies {
//classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.android.tools.build:gradle:3.5.4'
//classpath 'com.google.gms:google-services:4.3.5'
classpath 'com.google.gms:google-services:4.3.4'
}
}
allprojects {
repositories {
mavenCentral()
//google()
//jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
After this change, the error continues to appear since it comes from the Google Bintray repository, but I cannot remove Google in the repositories because I use some services, what should be done to solve the problem? I know that Bintray has been down for about 10 days but I want to know how mavenCentral() can be implemented correctly for the tensor-flow-lite package.
I am totally new and I do not know if the maven-metadata can be downloaded and how to implement it, so I need to know how to solve these dependencies, it is very complex for me.
[UPDATE]
Problems with dependencies by Bintray in Android [502] solved. IDE Android Studio version 4.1.1 .
After waiting for a response from bintray and contacting me by email, I realized that finally the bintray server would be blocked since Jfrog is migrating the artifacts to Artifactory, the email response was the following
"As stated in the blog post, Bintray will be sunsetted indefinitely and will not be a functional tool as we migrated the Bintray toolset into Artifactory.
"
This is the blog post for bintray is down
After this, it is very likely that bintray will not be available again, or although as the email response says, migrating the artifacts would take a long time if Jfrog considers lifting the bintray server.
To solve this and it works perfectly is:
[1.] Check what artifacts your project requires
[2.] Import the repositories containing the artifacts to build.gradle in the repositories
[3.] Comment (if you wish in hope that google bintray returns) the google repository ().
[4.] Verify the correct implementation of the dependencies
All this will make the repositories look for the dependency that was in bintray and occupy it from the raised server that you have chosen.
Personally my artifacts were in the maven() repositories so I made this change in the build.gradle.
Replace google () and jCenter () in repositories with maven ().
build.gradle
buildscript {
repositories {
mavenCentral()
maven {
url 'https://maven.google.com'
}
//mavenCentral()
//google()
//jcenter()
}
dependencies {
//classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.android.tools.build:gradle:4.1.0'
//classpath 'com.google.gms:google-services:4.3.5'
classpath 'com.google.gms:google-services:4.3.4'
}
}
allprojects {
repositories {
mavenCentral()
maven {
url 'https://maven.google.com'
}
//mavenCentral()
//google()
//jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
This got them repositories they needed...
Check if you have Google Play servecies installed, it solved some problems for me.
Flutter plugin
There is a similar answer similarthat helps this, but it does not correspond to the Android IDE and this one requires a few more small steps.
Flutter plugins (some) despite the repository changes in build.gradle by maven () in the general project, will continue to search google.bintray repositories because the plugin itself has this repository in its build.gradle, surely this error will appear if not the following is solved.
> Unable to load Maven meta-data from https://google.bintray.com/exoplayer/org/tensorflow/tensorflow-lite/maven-metadata.xml.
This is an example with flutter plugin "tflite".
To solve this, you have to look for the flutter plugins obtained by pubspec.yaml.
NOTE: It is important that these changes are simply a temporary trick until google fixes the problem of its storage in bintray or although, until there are versions directed to maven (), at least this allows the application to be compiled and it works, in my case it was Well, but I say again, it is a trick and should not be done.
[1.]At the project level, look for the flutter plugins in External libraries>Flutter pluggins>Search plugging error(example tflite).
[2.]Open the plugin and modify its build.gradle, changing the repositories where the artifact is on another server, in my case it was still in maven ().
Change the version of the artifact in the dependencies, if a + appears, delete it, leave a fixed version.
Note: the "includeGroup" in repository is added so that the plugging does not look for the bintray plugin again, if you delete this or the google repository (), I don't know why the plugging keeps looking for that path, so it is better to leave it excluded so that it looks in the self-specified repositories.
build.gradle of plugging (example tflite)
group 'sq.flutter.tflite'
version '1.0-SNAPSHOT'
buildscript {
repositories {//Changes here ***************
mavenCentral()
maven {
url 'https://maven.google.com'
}
google {
content {
includeGroup "https://google.bintray.com/exoplayer/org/tensorflow/tensorflow-lite/0.0.1/tensorflow-lite-0.0.1.pom"
}
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
}
}
rootProject.allprojects {
repositories {
mavenCentral()
maven {
url 'https://maven.google.com'
}
google {
content {
includeGroup "https://google.bintray.com/exoplayer/org/tensorflow/tensorflow-lite/0.0.1/tensorflow-lite-0.0.1.pom"
}
}
}
}
apply plugin: 'com.android.library'
android {
compileSdkVersion 27
defaultConfig {
minSdkVersion 16
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
lintOptions {
disable 'InvalidPackage'
}
dependencies {//Changes here, delete 0.0.5+ to 0.0.5 example..
compile 'org.tensorflow:tensorflow-lite:0.0.1-gpu-experimental'
}
}
Reminder: remember to check the repository well and in the dependencies delete the version that contains +, example 0.0.5+ and change it for an existing fixed version example 0.0.2.
If your editor says that the file does not belong to your project, select "I want to edit this file anyway".
All these changes will cause the Flutter pluggin itself to search a server that has a complement and is functional while google does not fix this or launches a new version, possibly if you update the pubspec.yaml you can revert your own changes in the pluggin, so be careful , but this should compile you for now.
I can confirm this is working fix.Already upvoted your answer.
This is tflite build gradle plugin that i modified for my tensorflow-lite project
group 'sq.flutter.tflite'
version '1.0-SNAPSHOT'
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
}
}
rootProject.allprojects {
repositories {
google()
mavenCentral()
}
}
apply plugin: 'com.android.library'
android {
compileSdkVersion 30
defaultConfig {
minSdkVersion 21
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
lintOptions {
disable 'InvalidPackage'
}
dependencies {
implementation 'org.tensorflow:tensorflow-lite:2.3.0'
implementation 'org.tensorflow:tensorflow-lite-gpu:2.3.0'
}
}
This is my current build gradle. I changed all jcenter to mavencentral to make it work. My project now work both offline and online.
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
google() // Google's Maven repository
mavenCentral() // removed jcenter add this
}
dependencies {
classpath 'com.google.gms:google-services:4.3.4'
classpath 'com.android.tools.build:gradle:4.0.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google() // Google's Maven repository
mavenCentral() // removed jcenter add this
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
By the im using TFlite plugin version 1.1.1
Gradle wrapper version
distributionUrl = https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
I have Same Error.In my case i used the simple method to solve that problem.
Go to External libraries -> Flutter pluggins -> tflite-1.1.2 -> android -> build.gradle
Change the dependencies
compile 'org.tensorflow:tensorflow-lite:1.1.2' &
compile 'org.tensorflow:tensorflow-lite-gpu:1.1.2'
Change into Like this
implementation 'org.tensorflow:tensorflow-lite:2.3.0'
implementation 'org.tensorflow:tensorflow-lite-gpu:2.3.0'
It's work for me.Try this and Thanks you.
Related
error:
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher.
The following dependencies do not satisfy the required version:
project ':ar_flutter_plugin' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50
android/build.gradle
buildscript {
ext.kotlin_version = '1.6.10'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.3.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I actually tried to solve this problem in Flutter:
I found a solution for that here:
Why am I getting this warning and how to resolve it "This version only understands SDK XML versions up to 2 but an SDK XML..."
But then I ran into similar problem as yours.
AFAIK the main problem is the limitations in the libraries we are using, and that it isn't prepared for the level we want to.
If you use AS and look here:
under Flutter plugins, and find the module which is complaining
In my case it was "location:", and if you expand the "android" folder here you can find the contents of the gradle file:
AS you see, the level of 'ext.kotlin_version' is 1.4.20, which is too low.
Either we need to find a new provider to our libraries, try to convince the creator to release an updated version, or try to manually change it (I personally don't like to tamper with libraries that way).
In Android Studio 4.2 there is a warning:
buildscript {
ext.kotlin_version = '1.5.0'
repositories {
google()
//jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
//jcenter()
mavenCentral()
}
}
If I remove jcenter() then it can't find some dependencies of my app project:
> Could not find org.koin:koin-core:2.0.1.
Required by:
project :app
> Could not find org.koin:koin-androidx-scope:2.0.1.
Required by:
project :app
> Could not find org.koin:koin-androidx-viewmodel:2.0.1.
Required by:
project :app
> Could not find com.google.ads.mediation:chartboost:8.1.0.0.
Required by:
project :app
In replace of jcenter() I added mavenCentral()
Move mavenCentral() above jcenter().
do a clean/build on your project.
comment out jcenter()
By moving mavenCentral() above jcenter(), mavenCentral() now becomes the primary repository for all non Google artifacts. By doing a clean and build, all artifacts are now moved to mavenCentral().
I had to look this up and tried it. I went from all heck breaking loose after I removed jcenter() to being able to build my final project for school again.
For koin, change the group id from org.koin to io.insert-koin - the latter is published on maven central.
For chartboost, you can use the following repo:
maven {
url "https://dl.bintray.com/google/mobile-ads-adapters-android/"
}
Also note that there are newer versions such as koin 2.2.2 / 3.0.1 and chartboost 8.2.0.0. Older versions are likely not republished in non-jcenter repos.
mvnrepository is a good service for locating packages.
just commenting out jcenter() will help,
mavencentral() is already above jcenter.
Locate all build.gradle files in your project folder tree, open them and replace jcenter() by mavenCentral(). It works for me most of the time.
It is interesting that the AndroidStudio project template still adds the ref to jcenter() to gradle, but then as soon as the project attempts to build it requests that you remove it.
I just delete it from the gradle file and then it works.
So there are two issues here.
First, we need to move MavenCentral above jCenter in all projects
Second, Android build tools version need to upgraded to 4.2.0 and above. As Android internal build tool dependencies are going to jCenter
dependencies {
classpath("com.android.tools.build:gradle:4.2.0")
}
It should work
Hope this will help
Go to App/Gradle Scripts/build.gradle (Project:---)
Change the jcenter() on build script{} and in all project repositories.
and Sync now.
This is how it looklike before.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.1'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
and after.
buildscript {
repositories {
google()
mavencentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.1'
}
}
allprojects {
repositories {
google()
mavencentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
This might help someone.
allprojects {
repositories {
...
maven { url "https://jitpack.io" }
...
}
}
I used this to resolve:
> Could not find com.github.parse-community.Parse-SDK-Android:parse:1.26.0.
Required by:
project :app
I got the same error, while i was using the Android Studio Artic Fox Beta - 3 but after change Android Studio as Canary Build the error gone
The solution I did was to change build:gradle version:
dependencies {
classpath("com.android.tools.build:gradle:4.2.2")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
The solution is simpe
just Locate build.gradle and replace jcenter() by mavenCentral().
good luck
I was trying to integrate Firebase Crashlytics on my react native app but got this error while building the app.
What went wrong:
A problem occurred configuring root project 'MyApp'.
Could not resolve all artifacts for configuration ':classpath'.
Could not find io.fabric.tools:gradle:1.26.1.
Searched in the following locations:
https://dl.google.com/dl/android/maven2/io/fabric/tools/gradle/1.26.1/gradle-1.26.1.pom https://dl.google.com/dl/android/maven2/io/fabric/tools/gradle/1.26.1/gradle-1.26.1.jar
https://repo.maven.apache.org/maven2/io/fabric/tools/gradle/1.26.1/gradle-1.26.1.pom
https://repo.maven.apache.org/maven2/io/fabric/tools/gradle/1.26.1/gradle-1.26.1.jar
https://jcenter.bintray.com/io/fabric/tools/gradle/1.26.1/gradle-1.26.1.pom
https://jcenter.bintray.com/io/fabric/tools/gradle/1.26.1/gradle-1.26.1.jar
Required by:
project :
Try:
I've added classpath 'io.fabric.tools:gradle:1.26.1' in dependencies and
maven {
url 'https://maven.fabric.io/public'
}
in repositories in build.gradle as suggested in documentation.
Before, I got the same issue because I moved the url 'https://maven.fabric.io/public' to the wrong place
I guess you guy also same. My working build.grande is
buildscript {
repositories {
google()
jcenter()
// Additional repository for fabric resources
maven {
url 'https://maven.fabric.io/public'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
classpath 'com.google.gms:google-services:4.2.0'
// Add fabric classpath
classpath 'io.fabric.tools:gradle:1.26.1'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
As per the documentation of the fabric integration.
Try using this as a sub-library of the project.
In your app's Gradle mention the below code. It will work.
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
You have to ensure that everything in the documentation that should be in the project-level build.gradle file is there and make sure everything that should be in app-level build.gradle file is there.
Do not interchange anything.
I've downloaded a new android project and for some reason I get this error when I am trying to build the app:
Could not find lint-checks.jar (com.android.tools.lint:lint-checks:26.0.1). Searched in the following locations: https://jcenter.bintray.com/com/android/tools/lint/lint-checks/26.0.1/lint-checks-26.0.1.jar
Weirdly, when I go to that url I can download the jar, so i'm really unsure why Android studio is complaining. I've downloaded the latest version - 3.1.2.
I've also tried disabling lint but no luck with removing the error!
Any help would be greatly appreciated!
My gradle file:
buildscript {
repositories {
jcenter()
mavenCentral()
google()
maven { url 'https://maven.fabric.io/public' }
maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
//noinspection GradleDynamicVersion
classpath 'io.fabric.tools:gradle:1.+'
classpath 'com.google.gms:google-services:3.1.2'
classpath 'com.android.tools.lint:lint-checks:26.0.1'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.17.0'
classpath "io.realm:realm-gradle-plugin:4.3.3"
}
}
allprojects {
repositories {
google()
jcenter()
mavenCentral()
google()
maven { url "https://jitpack.io" }
maven { url 'https://maven.fabric.io/public' }
maven { url "https://dl.bintray.com/drummer-aidan/maven" }
flatDir {
dirs '../aars'
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I also started getting this issue this morning. I had not updated anything, not really sure what changed over the weekend.
I managed to fix the issue by updating my buildToolsVersion from 26.0.2 to 27.0.3, which also required me to update my Gradle version from 4.3 to 4.4 and my Gradle Plug-in from 3.0.1 to 3.1.2.
This was before I saw the solution provided by Floern, which also works. Not sure why though and i figured it's always better to stay up to date with the latest versions of Gradle.
try to add "com.android.tools.lint:lint-checks:26.0.1" to your gradle dependencies
I have updated Android Studio to 3.0 and now received a lot of issues.. now stoped on point with such issue:
Could not resolve all files for configuration ':applib:_lintClassPath'.
> Could not find com.android.tools.lint:lint-gradle:26.1.0-alpha01.
Searched in the following locations:
file:/Users/anwender/Library/Android/sdk/extras/m2repository/com/android/tools/lint/lint-gradle/26.1.0-alpha01/lint-gradle-26.1.0-alpha01.pom
file:/Users/anwender/Library/Android/sdk/extras/m2repository/com/android/tools/lint/lint-gradle/26.1.0-alpha01/lint-gradle-26.1.0-alpha01.jar
file:/Users/anwender/Library/Android/sdk/extras/google/m2repository/com/android/tools/lint/lint-gradle/26.1.0-alpha01/lint-gradle-26.1.0-alpha01.pom
file:/Users/anwender/Library/Android/sdk/extras/google/m2repository/com/android/tools/lint/lint-gradle/26.1.0-alpha01/lint-gradle-26.1.0-alpha01.jar
file:/Users/anwender/Library/Android/sdk/extras/android/m2repository/com/android/tools/lint/lint-gradle/26.1.0-alpha01/lint-gradle-26.1.0-alpha01.pom
file:/Users/anwender/Library/Android/sdk/extras/android/m2repository/com/android/tools/lint/lint-gradle/26.1.0-alpha01/lint-gradle-26.1.0-alpha01.jar
https://jcenter.bintray.com/com/android/tools/lint/lint-gradle/26.1.0-alpha01/lint-gradle-26.1.0-alpha01.pom
https://jcenter.bintray.com/com/android/tools/lint/lint-gradle/26.1.0-alpha01/lint-gradle-26.1.0-alpha01.jar
https://jitpack.io/com/android/tools/lint/lint-gradle/26.1.0-alpha01/lint-gradle-26.1.0-alpha01.pom
https://jitpack.io/com/android/tools/lint/lint-gradle/26.1.0-alpha01/lint-gradle-26.1.0-alpha01.jar
file:/Users/anwender/dev/project/dk_shopping_checklist/augmented/libs/lint-gradle-26.1.0-alpha01.jar
file:/Users/anwender/dev/project/dk_shopping_checklist/augmented/libs/lint-gradle.jar
Required by:
project :applib
Does someone know what the issue can be?
Gradle.build:
apply plugin: 'com.android.library'
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
minSdkVersion 24
targetSdkVersion 26
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:+'
}
I'm using latest gradle version: "gradle-4.2.1-all.zip".
If you're running lint on a project that you created using an older version of Android Studio, you may encounter this error.
To resolve this issue, for each project that you would like to run lint on, include Google's Maven repository in the top-level build.gradle file, as shown below:
allprojects {
repositories {
// The order in which you list these repositories matter.
google()
jcenter()
}
}
It looks to me like you're missing the google() repository in order to fetch the dependency.
Here's the link to the pom file that you're looking for: https://dl.google.com/dl/android/maven2/com/android/tools/testutils/26.1.0-alpha01/testutils-26.1.0-alpha01.pom
My answer is for everyone that Already have google() in repositories but still have same error
goto android studio settings and search for "HTTP Proxy" and make sure you haven't set a wrong proxy there. (set it to auto-detect proxy settings if not sure)
close android studio
goto C:/Users/DESKTOP-NAME/ and Delete .gradle folder (yes, it's big folder but don't be scared its just keeping all versions of your old gradle files that is not needed now)
goto you project folder and delete .gradle folder and app/build folder (make a backup before this just in case)
restart your PROXY server Or VPN provider (if you use one) and make sure you have a working internet connection.
Open Android Studio and wait until successful build (it's gonna take a little longer).
I solved this by adding the https://mvnrepository.com/artifact/com.android.tools.lint/lint-gradle-api
repo to build.gradle:
repositories {
maven {
url 'https://maven.google.com/'
name 'Google'
}
jcenter()
maven {
url 'https://mvnrepository.com/artifact/com.android.tools.lint/lint-gradle-api'
}
}
I have changed my current gradle version(3.3.2 to 3.2.1) from the global build.gradle file.
buildscript {
repositories {
google()
jcenter()
maven { url 'https://maven.google.com' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}
}
allprojects {
repositories {
google()
jcenter()
maven { url 'https://maven.google.com' }
}
}
then click on sync gradle button on the top right corner of the screen.
Try this,
File -> Settings -> Build,Execution,Deployment -> Gradle -> Android Studio -> Select -Enable embedded maven repository - Apply.
Another option is
./gradlew -x:app:lintVitalRelease assemble
To quote Gradle Docs:
Excluding tasks from execution
You can exclude a task from being executed using the -x or --exclude-task command-line option and providing the name of the task to exclude.
Reference: https://docs.gradle.org/current/userguide/command_line_interface.html#sec:excluding_tasks_from_the_command_line
Archived link: http://archive.is/TsPPJ#sec:excluding_tasks_from_the_command_line
just comment google and sync project
repositories {
google()
jcenter()
}
Disable offline mode and uncomment google() and sync again...
To solve dependencies issues it's always helpful to use
./gradlew clean build --refresh-dependencies
In my case I got the next message:
- Variant 'runtimeElements' capability com.android.tools.lint:lint-api:30.0.2 declares a runtime of a library, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm':
- Incompatible because this component declares a component compatible with Java 8 and the consumer needed a component compatible with Java 7
- Other compatible attribute:
- Doesn't say anything about its target Java environment (preferred optimized for standard JVMs)
So, my problem with this dependency was that I was using:
java {
sourceCompatibility = JavaVersion.VERSION_1_7
targetCompatibility = JavaVersion.VERSION_1_7
}
and this particular dependency requires JavaVersion.VERSION_1_8 instead. When I replaced it by
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
it started working.
Add google() to your gradle
If you face this again,Do not add a linter disabler to your gradle, This is an access error issue,I faced that on react-native after using sudo command for a few command, Just reset your code access and then release again For example the mac
sudo chmod -R 777 <project-root-folder-name>
add below code to your build.gradle (Module) to skip error
lintOptions {
abortOnError false
}
My has this issue,
solved by below lines
buildscript {
ext.kotlin_version = '1.3.60'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1' //3.4.2, 3.4.1^, 2.3.3^
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
classpath 'com.google.gms:google-services:4.3.3'
}
}
//################################################################################
allprojects {
repositories
{
google()
jcenter()
mavenCentral()
maven { url "https://dl.google.com/dl/android/maven2/" }
maven { url "http://jcenter.bintray.com/" }
maven { url 'https://plugins.gradle.org/m2/'}
maven { url "https://maven.google.com" }
maven { url 'https://jitpack.io' }
maven { url 'https://mvnrepository.com/artifact/com.android.tools.lint/lint-gradle-api' }
flatDir {
dirs 'libs'
}
}
}
//################################################################################
task clean(type: Delete) {
delete rootProject.buildDir
}
im my case I solved the problem by downgrading gradle version from 3.6.3:
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
to 3.4.2:
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
Do not comment out google(), while applying the solutions above:
repositories {
maven {
url 'https://maven.google.com/'
name 'Google'
}
jcenter()
google()
maven {
url 'https://mvnrepository.com/artifact/com.android.tools.lint/lint-gradle-api'
}
}
For me just deleting .gradle folder in directory of C:\Users\[Your User]
and rebuild project worked.