Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New build errors (lint-gradle-api.jar) #200

Open
joegoodall2 opened this issue Oct 23, 2018 · 30 comments · May be fixed by #208
Open

New build errors (lint-gradle-api.jar) #200

joegoodall2 opened this issue Oct 23, 2018 · 30 comments · May be fixed by #208

Comments

@joegoodall2
Copy link

joegoodall2 commented Oct 23, 2018

Started to get these build errors today. Previously have had no problems and have not made changes to native code recently.

Anyone else had the same issue?

> Could not resolve all files for configuration ':react-native-fabric:classpath'.
   > Could not find lint-gradle-api.jar (com.android.tools.lint:lint-gradle-api:26.1.2).
     Searched in the following locations:
         https://jcenter.bintray.com/com/android/tools/lint/lint-gradle-api/26.1.2/lint-gradle-api-26.1.2.jar```
@sibelius
Copy link
Contributor

mover jcenter() below google()

@jgcmarins
Copy link

check this: react-native-share/react-native-share#387

@ronilitman
Copy link

ronilitman commented Oct 23, 2018

Same issue. Any solution? @sibelius this does not work for me.

@chrusart
Copy link

chrusart commented Oct 23, 2018

Did you make this changes in your project @ronilitman ?
This should be made in react-native-fabric package which is already in master.
I couldn't make it work changing own project dependencies order.

"react-native-fabric": "github:corymsmith/react-native-fabric#523a4edab3b2bf55ea9eeea2cf0dde82c5c29dd4",
should work

@joegoodall2
Copy link
Author

joegoodall2 commented Oct 23, 2018

Thanks @chrusart, this worked for us.

@sibelius The changes made in this commit do not appear when installing the latest version (0.5.2)? 🤔

@asutula
Copy link

asutula commented Oct 23, 2018

I had to point to the HEAD of master here and also move google() before jcenter(). You can see there is no .jar next to this .pom: https://jcenter.bintray.com/com/android/tools/lint/lint-gradle-api/26.1.2/

Quick twitter search for #gradle shows others having similar problems with other packages. Seems like missing files on jcenter, possibly related to yesterday's Github webhook outage??? Who knows.

@ronilitman
Copy link

Thank you @chrusart , this works. Is it going to be in master any soon?

@burtek
Copy link

burtek commented Oct 24, 2018

Any plans for releasing fixed version?

@vadimshvetsov
Copy link

vadimshvetsov commented Oct 24, 2018

At this moment there is an opened pull request. I hope it would help.

@chrusart
Copy link

There is no need for PR @vadimshvetsov , current master has a fix and just have to be released.

@iremlopsum
Copy link

Could this be released asap? Makes it hard to make builds when changes are needed in node_modules

@FunkyGeorge
Copy link

This break started with v0.5.2, I know some folks are waiting for new version to be fixed but if you target v0.5.1 like docs recommend, it works fine.

@Jeet007das
Copy link

Jeet007das commented Nov 9, 2018

mover jcenter() below google()

This doesn't work for me.

@ronilitman
Copy link

Can the fix be released to master please?

@SuEric
Copy link

SuEric commented Nov 11, 2018

Having trouble on this as well... Looking for a quick solution without upgrading gradle or something :(

@ghost
Copy link

ghost commented Nov 13, 2018

Today, I got same issue.

@joegoodall2
Copy link
Author

@sibelius Any update on this?

@ghost
Copy link

ghost commented Nov 14, 2018

I unable to deliver my react-native project to production.

@wynch
Copy link

wynch commented Nov 14, 2018

You can override this setting in your root project build.gradle (the one in your android/ folder, not android/app/). I'm no Gradle expert, but if you don't want to edit your node_module build.gradle, here's an extract of my root build.gradle :

// ...

allprojects {
    repositories {
        mavenLocal()
        google()
        
        maven {
            // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
            url "$rootDir/../node_modules/react-native/android"
        }
        maven {
            // Firebase : Google Play services from 11.2.0 +
            url 'https://maven.google.com'
        }
        jcenter()
      
    }

    buildscript {
        repositories {
            mavenLocal()
            google()

            maven {
                // All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
                url "$rootDir/../node_modules/react-native/android"
            }
            maven {
                // Firebase : Google Play services from 11.2.0 +
                url 'https://maven.google.com'
            }
            jcenter()
            
        }
    }

}

@zvs001
Copy link

zvs001 commented Nov 27, 2018

Any described solution don`t work for me.

yarn add react-native-fabric@0.5.2 - No

yarn add http://github... - No

yarn add react-native-fabric@0.5.1 - Can't release

I found only one way to resolve issue:

yarn add react-native-fabric@0.5.2
nano ./node_modules/react-native-fabric/android/build.gradle

And edit config: (editing own gradle doesn't help at all)

buildscript {
    repositories {
        google() // <== add this line
        jcenter()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
    }

@taschik
Copy link
Collaborator

taschik commented Dec 4, 2018

any news on this? manually changing an external dependency is not really an option for me as I have a fully automated build process where I won't allow manual changes in third-party dependency. Id like to avoid forking and rather point to a working official release version

@wynch
Copy link

wynch commented Dec 4, 2018

I don't know, but I provided a quickfix that works without editing the node module gradle, see my answer

@shroomist
Copy link

Unfortunately, solution by @wynch doesn't work for me.
stuck with having to edit the ./node_modules/react-native-fabric/android/build.gradle each time after updating my dependencies :/

@AkshayBaldia
Copy link

I am also getting the same issue after adding this to android

Could not find lint-gradle-api.jar (com.android.tools.lint:lint-gradle-api:26.1.2).
Searched in the following locations:
https://jcenter.bintray.com/com/android/tools/lint/lint-gradle-api/26.1.2/lint-gradle-api-26.1.2.jar

@AkshayBaldia
Copy link

Solved this by adding google() in build.gradle file of library

../node_modules/react-native-fabric/android

@bvanleeuwen1995
Copy link

I can confirm that adding the google() value to the build.gradle fixes this issue, please create a release to fix this asap since I need to fork now which is something I do not want to do.

AkshayBaldia added a commit to AkshayBaldia/react-native-fabric that referenced this issue Dec 7, 2018
@anshumanburman
Copy link

google() was msising in react-native-fabric build.gradle

@letientai299
Copy link

I'm able to fix it by adding following config in android/build.gradle

subprojects { project ->
  buildscript {
    repositories {
      google()
      jcenter()
      maven { url "https://dl.bintray.com/android/android-tools/" }
    }
  }
}

@Jeet007das
Copy link

Jeet007das commented Dec 27, 2018 via email

@moloudayat
Copy link

my code worked yesterday but today when I use gradlew bundleRelease I get this error. I change google() and jcenter() position but it didn't work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.