react-native-fabric icon indicating copy to clipboard operation
react-native-fabric copied to clipboard

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

Open joegoodall2 opened this issue 7 years ago • 30 comments

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```

joegoodall2 avatar Oct 23 '18 13:10 joegoodall2

mover jcenter() below google()

sibelius avatar Oct 23 '18 13:10 sibelius

check this: https://github.com/react-native-community/react-native-share/pull/387

jgcmarins avatar Oct 23 '18 13:10 jgcmarins

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

ronilitman avatar Oct 23 '18 14:10 ronilitman

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

chrusart avatar Oct 23 '18 14:10 chrusart

Thanks @chrusart, this worked for us.

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

joegoodall2 avatar Oct 23 '18 15:10 joegoodall2

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.

asutula avatar Oct 23 '18 23:10 asutula

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

ronilitman avatar Oct 24 '18 06:10 ronilitman

Any plans for releasing fixed version?

burtek avatar Oct 24 '18 10:10 burtek

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

vadimshvetsov avatar Oct 24 '18 11:10 vadimshvetsov

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

chrusart avatar Oct 26 '18 08:10 chrusart

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

iremlopsum avatar Oct 31 '18 09:10 iremlopsum

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.

FunkyGeorge avatar Nov 08 '18 01:11 FunkyGeorge

mover jcenter() below google()

This doesn't work for me.

Jeet007das avatar Nov 09 '18 09:11 Jeet007das

Can the fix be released to master please?

ronilitman avatar Nov 10 '18 23:11 ronilitman

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

SuEric avatar Nov 11 '18 02:11 SuEric

Today, I got same issue.

ghost avatar Nov 13 '18 10:11 ghost

@sibelius Any update on this?

joegoodall2 avatar Nov 13 '18 12:11 joegoodall2

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

ghost avatar Nov 14 '18 02:11 ghost

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()
            
        }
    }

}

wynch avatar Nov 14 '18 11:11 wynch

Any described solution don`t work for me.

yarn add [email protected] - No

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

yarn add [email protected] - Can't release

I found only one way to resolve issue:

yarn add [email protected]
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'
        }
    }

zvs001 avatar Nov 27 '18 13:11 zvs001

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

taschik avatar Dec 04 '18 01:12 taschik

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

wynch avatar Dec 04 '18 02:12 wynch

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 :/

andycandy-dev avatar Dec 06 '18 08:12 andycandy-dev

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 avatar Dec 06 '18 12:12 AkshayBaldia

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

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

AkshayBaldia avatar Dec 06 '18 13:12 AkshayBaldia

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.

bvanleeuwen1995 avatar Dec 07 '18 09:12 bvanleeuwen1995

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

anshumanburman avatar Dec 21 '18 16:12 anshumanburman

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/" }
    }
  }
}

letientai299 avatar Dec 26 '18 18:12 letientai299

Thank you

On Thu, Dec 27, 2018, 12:00 AM Tai Le <[email protected] wrote:

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/" } } } }

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/corymsmith/react-native-fabric/issues/200#issuecomment-450005636, or mute the thread https://github.com/notifications/unsubscribe-auth/Amzl2J7bMPayLBKV7PS7VBT4DTZiKFepks5u88AngaJpZM4X1jH3 .

Jeet007das avatar Dec 27 '18 03:12 Jeet007das

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

moloudayat avatar Oct 30 '19 13:10 moloudayat