react-native-git-upgrade not working - android

I just tried to run react-native-git-upgrade by following the documentation here. After running the upgrade, I then tried to start my project using react-native run-android but got the following errors (see below).
I also tried to follow the "Alternative" way of upgrading from that documentation but eventually ended up with the same error shown below.
How should I proceed to get the upgrade working properly?
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApkCopy'.
> Could not resolve com.facebook.fresco:fresco:1.0.1.
Required by:
OrderEntry:app:unspecified > com.facebook.react:react-native:0.43.3
> Could not resolve com.facebook.fresco:fresco:1.0.1.
> Could not get resource 'https://jcenter.bintray.com/com/facebook/fresco/fresco/1.0.1/fresco-1.0.1.pom'.
> Could not GET 'https://jcenter.bintray.com/com/facebook/fresco/fresco/1.0.1/fresco-1.0.1.pom'.
> jcenter.bintray.com
> Could not resolve com.facebook.fresco:imagepipeline-okhttp3:1.0.1.
Required by:
OrderEntry:app:unspecified > com.facebook.react:react-native:0.43.3
> Could not resolve com.facebook.fresco:imagepipeline-okhttp3:1.0.1.
> Could not get resource 'https://jcenter.bintray.com/com/facebook/fresco/imagepipeline-okhttp3/1.0.1/imagepipeline-okhttp3-1.0.1.pom'.
> Could not GET 'https://jcenter.bintray.com/com/facebook/fresco/imagepipeline-okhttp3/1.0.1/imagepipeline-okhttp3-1.0.1.pom'.
> jcenter.bintray.com

I was finally able to resolve this. It turned out to be an issue with gradle not being able to access the google repositories due to proxy issues. To resolve it, I added a gradle.properties file to my C:\Users\my_user_id>\.gradle folder with the following values:
systemProp.http.proxyHost=your_proxy.com
systemProp.http.proxyPort=80
systemProp.https.proxyHost=your_proxy.com
systemProp.https.proxyPort=80
Once I added that file, I actually ran into more problems which you can read about here, but I finally got things running.
I am not sure why the project ran ok on the previous react-native version without needing the gradle.properties file. Anyway, hope this helps if anyone has the same problem.

Related

'extractApksForDebug' not found

An android app fails to build and run and displays this error message.
Task 'extractApksForDebug' not found in project ':app'.
When I tried to clean and build again, this error comes
Task 'bundleDebug' is ambiguous in project ':app'. Candidates are: 'bundleDebugAndroidTestResources', 'bundleDebugResources'.
How can I find the error and correct that?
Go to Help > Check for Updates.
Update all.
This will resolve the issue.
This one works for me.
On right pane of android studio click on Gradle > Right click on project > Refresh Gradle dependencies.

Jenkins: Ionic android build failed

I am beginner of ionic mobile development and now I am setting CI for my mobile application using Jenkins (on localhost). I am facing an error that I am unable to resolve for many days. ionic compiles successfully but at the last at the time of android build preparation it fails and gives error I mentioned below.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all files for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:3.0.0.
Required by:
project :
> Could not resolve com.android.tools.build:gradle:3.0.0.
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom'.
> Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom'.
> corphttpsproxyhost.yourdomain: Name or service not known
> Could not resolve com.android.tools.build:gradle:3.0.0.
> Could not get resource 'https://maven.google.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom'.
> Could not GET 'https://maven.google.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom'.
> corphttpsproxyhost.yourdomain
Please let me know where I am committing mistake, or is there any other dependency issue.
Thanks
I think you did not add gradle 3.0.0
You can do this by going to “Configure System” (Jenkins 1.x) or to “Global Tool Configuration” (Jenkins 2.x). From the home page navigate to:
Manage Jenkins -> Configure System (Jenkins 1.x)
Manage Jenkins -> Global Tool Configuration (Jenkins 2.x)
Scroll down a little bit and you should encounter a small section for gradle with a single button labeled “Gradle installations…”. Click on that button to expand the configuration panel.
The gradle configuration panel will ask for a few parameters. Here you can set the tool to a static path, or let Jenkins handle the installation for you. We recommend using “Install automatically” for ease of use. Below is an example of an automatic installation of gradle 3.0.0
than you have to select this gradle version from your project configration.
in bbuild tab
add Invoke Gradle script
Invoke Gradle
X Gradle Version 3.0.0
than build it it may help you

Sync failed - Could not find com.google.android.gms:play-services:9.4.0

I tried to run a project which was generated on someone else's PC, but sync fails and I get this error when cleaning the project:
Error:A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
> Could not find com.google.android.gms:play-services:9.4.0.
Searched in the following locations:
https://jcenter.bintray.com/com/google/android/gms/play-services/9.4.0/play-services-9.4.0.pom
https://jcenter.bintray.com/com/google/android/gms/play-services/9.4.0/play-services-9.4.0.jar
file:/C:/Users/win7/AppData/Local/Android/sdk1/extras/android/m2repository/com/google/android/gms/play-services/9.4.0/play-services-9.4.0.pom
file:/C:/Users/win7/AppData/Local/Android/sdk1/extras/android/m2repository/com/google/android/gms/play-services/9.4.0/play-services-9.4.0.jar
file:/C:/Users/win7/AppData/Local/Android/sdk1/extras/google/m2repository/com/google/android/gms/play-services/9.4.0/play-services-9.4.0.pom
file:/C:/Users/win7/AppData/Local/Android/sdk1/extras/google/m2repository/com/google/android/gms/play-services/9.4.0/play-services-9.4.0.jar
Required by:
Map:app:unspecified
was generated on someone other's PC on mine
They probably have the SDK repositories installed and you do not.
Seems like you are missing the Google Play Services Repository.

How to download gradle manually?

I'm using Android Studio version 1.4 and stuck at "Gradle: resolve dependencies ':app:_releaseCompile'"
I think it cause by proxy (I don't have access to proxy) so i want to know how to download gradle maunally
I've tried all method that I found changing properties file, edit parameters but won't work anyway.
Error log:
Error:A problem occurred configuring project ':app'.
>Could not resolve all dependencies for configuration ':app:_debugUnitTestCompile'.
> Could not resolve junit:junit:4.12.
Required by:
prototype1:app:unspecified
> Could not resolve junit:junit:4.12.
> Could not get resource 'jcenter.bintray.com/junit/junit/4.12/junit-4.12.pom'.
> Could not GET 'jcenter.bintray.com/junit/junit/4.12/junit-4.12.pom'.
> Connection to jcenter.bintray.com refused

Gradle cant find support lib, Android

I have the build script from this project here:
https://github.com/melix/gr8confagenda/blob/master/gr8confagenda/build.gradle
But when I try to run the project, I get this error:
* What went wrong:
A problem occurred configuring project ':gr8confagenda'.
> Could not resolve all dependencies for configuration ':gr8confagenda:_debugCompile'.
> Could not find com.android.support:support-v4:19.1.0.
Required by:
gr8confagenda:gr8confagenda:unspecified
Where I'm making the mistake?

Categories

Resources