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

cannot build android anymore: Could not find common.jar #748

Closed
schumannd opened this Issue May 28, 2018 · 14 comments

Comments

Projects
None yet
@schumannd
Copy link

schumannd commented May 28, 2018

Without changing anything about the code, I cannot build android anymore.
The following error happens when running ./gradlew clean:


FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApk'.
   > A problem occurred configuring project ':react-native-push-notification'.
      > Could not find common.jar (android.arch.core:common:1.0.0).
        Searched in the following locations:
            https://jcenter.bintray.com/android/arch/core/common/1.0.0/common-1.0.0.jar

What could be the issue here?

react-native-cli: 2.0.1
react-native: 0.51.0
react-native-push-notification@3.0.2

@zizango123

This comment has been minimized.

Copy link

zizango123 commented May 28, 2018

same issue but instead of common.jar it is runtime.jar for me

* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApk'.
   > A problem occurred configuring project ':react-native-push-notification'.
      > Could not find runtime.jar (android.arch.lifecycle:runtime:1.0.0).
       Searched in the following locations:
         https://jcenter.bintray.com/android/arch/lifecycle/runtime/1.0.0/runtime-1.0.0.jar 
@chafouai

This comment has been minimized.

Copy link

chafouai commented May 28, 2018

I have the same probème,

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring project ':app'.

Could not resolve all dependencies for configuration ':app:_debugApk'.
A problem occurred configuring project ':react-native-push-notification'.
> Could not find common.jar (android.arch.core:common:1.0.0).
Searched in the following locations:
https://jcenter.bintray.com/android/arch/core/common/1.0.0/common-1.0.0.jar

can anyone please help us to resolve this issue. thanks.

@suutsutot

This comment has been minimized.

Copy link

suutsutot commented May 28, 2018

same issue

2 similar comments
@puneet94

This comment has been minimized.

Copy link

puneet94 commented May 28, 2018

same issue

@medportal2016

This comment has been minimized.

Copy link

medportal2016 commented May 28, 2018

same issue

@saynorio

This comment has been minimized.

Copy link

saynorio commented May 28, 2018

I am facing the same issue. I uninstalled 'react-native-push-notification' but now the same issues occurs with 'react-native-google-place-picker'. Any immediate help would be appreciated

@prpateldev

This comment has been minimized.

Copy link

prpateldev commented May 28, 2018

same issue with runtime.jar

@FreddyPoly

This comment has been minimized.

Copy link

FreddyPoly commented May 28, 2018

Seems like bintray has some problem with their files, you can change your android/build.gradle file to fix it temporarly and add another source to download from:

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

Thanks to this response

@prpateldev

This comment has been minimized.

Copy link

prpateldev commented May 28, 2018

@FreddyPoly I have done that app build but can't start the app it shows "Unfortunately, "App name" has stopped."

@saynorio

This comment has been minimized.

Copy link

saynorio commented Jun 1, 2018

@FreddyPoly Your solution works for me. Many Thanks

@RossKinsella

This comment has been minimized.

Copy link

RossKinsella commented Jun 8, 2018

@FreddyPoly Your workaround solved the issue for me two weeks back but it seems I'm getting jcenter releated build failures again. Any ideas?

Download https://jcenter.bintray.com/android/arch/lifecycle/common/1.0.0/common-1.0.0.jar

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
@leofernandezg

This comment has been minimized.

Copy link

leofernandezg commented Jun 8, 2018

+1 Please fix this issue.

@joshuapinter

This comment has been minimized.

Copy link

joshuapinter commented Jun 8, 2018

The order of repositories is very important. You'll want to make sure that jcenter() is below your maven listings.

By ordering your repositories like this, you're essentially pulling libraries from maven first, then your local node_modules directory and then anything that's not in those two will be pulled from jcenter.

@ASteinheiser

This comment has been minimized.

Copy link

ASteinheiser commented Jul 6, 2018

@joshuapinter Thank you for that snippet of information. That made a huge difference for me :)

@Gp2mv3 Gp2mv3 closed this Jul 8, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment