As I mentioned in the question, when I try to build my project it gives an error:
BUILD FAILED
Total time: 9 mins 33.837 secs
Error: /home/aqil/App/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'android'.
Could not resolve all dependencies for configuration ':_debugApk'.
A problem occurred configuring project ':CordovaLib'.
Could not resolve all dependencies for configuration ':CordovaLib:classpath'.
Could not resolve com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3.
Required by:
project :CordovaLib
Could not resolve com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3.
Could not get resource 'https://jcenter.bintray.com/com/jfrog/bintray/gradle/gradle-bintray-plugin/1.7.3/gradle-bintray-plugin-1.7.3.pom'.
Could not GET 'https://jcenter.bintray.com/com/jfrog/bintray/gradle/gradle-bintray-plugin/1.7.3/gradle-bintray-plugin-1.7.3.pom'.
Connect to jcenter.bintray.com:443 [jcenter.bintray.com/108.168.243.150] failed: Connection timed out (Connection timed out)
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
What's the problem with it, is it a gradle problem? I have downloaded the latest one, and included in my path, so what's wrong with it? I'm using Ubuntu.
Related
I'm using Android studio 3.6.1 on windows 10
(I'm new to flutter and this is my first try)
you can see my "flutter doctor" result here (all check):
flutter doctor command result
Unfortunately when I want to run my program this error Occurs:
android studio error
text:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:3.5.0.
Required by:
project :
> Could not resolve com.android.tools.build:gradle:3.5.0.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.5.0/gradle-3.5.0.pom'.
> Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.5.0/gradle-3.5.0.pom'.
> Connect to 127.0.0.1:2347 [/127.0.0.1] failed: Connection refused: connect
> Could not resolve com.android.tools.build:gradle:3.5.0.
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.5.0/gradle-3.5.0.pom'.
> Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.5.0/gradle-3.5.0.pom'.
> Connect to 127.0.0.1:2347 [/127.0.0.1] failed: Connection refused: connect
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 20s
Finished with error: Gradle task assembleDebug failed with exit code 1
I try all articles in Stack Overflow, YouTube and medium but I'm still stuck :(
Faced same problem, I resolved by;
Delete all files in .gradle folder and reopen Android studio to re-download and update to the latest files.
PATH: C:\Users\<YOUR-USER-NAME>\.gradle
This Worked for me. I hope it helps, then re-run flutter doctor command
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-linear-gradient'.
Could not resolve all dependencies for configuration ':react-native-linear-gradient:_debugCompileCopy'.
Could not find com.android.support:appcompat-v7:26.1.0.
Searched in the following locations:
file:/Users/omkaryadav/Library/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.pom
file:/Users/omkaryadav/Library/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.jar
file:/Users/omkaryadav/Documents/project/react/Archive/android/sdk-manager/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.jar
Required by:
project :react-native-linear-gradient > com.facebook.react:react-native:0.56.0
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 13.577 secs
You have to link 3rd party libraries before building your project. That specific library you can link automatically by running react-native link.
If you didn't already, run npm install before command above.
Please for days now, I have been trying to try with nativescript. All my installation went all fine but at the point of xecuting tns run android --emulator, it gives me the bellow error:
MiC#USER MINGW32 ~/Android-projects/HelloWorld
$ tns run android
Searching for devices...
Skipping prepare.
Building project...
Gradle build...
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'HelloWorld'.
Could not resolve all dependencies for configuration ':classpath'.
Could not resolve com.android.tools.build:gradle:2.4.0-alpha7.
Required by:
project :
Could not resolve com.android.tools.build:gradle:2.4.0-alpha7.
Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.4.0-alpha7/gradle-2.4.0-alpha7.pom'.
Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.4.0-alpha7/gradle-2.4.0-alpha7.pom'.
Connect to jcenter.bintray.com:443 [jcenter.bintray.com/159.122.18.156] failed: Connection timed out: connect
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Unable to apply changes on device: 192.168.98.101:5555. Error is: Command gradlew.bat failed with exit code 1.
Please, what do I do to rectify this error?
Thank you for your response in advance.
Just delete the android folder in your project's platform folder.
and then run tns run android
I'm trying to build linphone in ubuntu 64 bit machine.
i have generated the make file and when i initiate make command on it,
The following error occurs :
Could not resolve com.android.tools.build:gradle:3.3.
> java.lang.NoClassDefFoundError: Could not initialize class sun.security.ssl.SSLContextImpl$TLSContext
why is this error occuring? im using openjdk-8-jre
Here is the full error
Reading makefiles...
Updating goal targets....
File 'all' does not exist.
File 'generate-apk' does not exist.
File 'java-clean' does not exist.
Must remake target 'java-clean'.
./gradlew clean
NOTE: Picked up the following options via JDK_JAVA_OPTIONS:
--add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'linphone-android'.
Could not resolve all dependencies for configuration ':classpath'.
Could not resolve com.android.tools.build:gradle:3.3.
Required by:
project :
Could not resolve com.android.tools.build:gradle:3.3.
java.lang.NoClassDefFoundError: Could not initialize class sun.security.ssl.SSLContextImpl$TLSContext
Could not resolve com.android.tools.build:gradle:3.3.
java.lang.NoClassDefFoundError: Could not initialize class sun.security.ssl.SSLContextImpl$TLSContext
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 10.267 secs
Makefile:17: recipe for target 'java-clean' failed
make: *** [java-clean] Error 1
I cloned git project https://github.com/fbsamples/f8app
I do all the instructions. But when I try to run the project (run-android) error occurs.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> A problem occurred configuring project ':react-native-fbsdk'.
> Could not resolve all dependencies for configuration ':react-native-fbsdk:_debugCompile'.
> Could not find com.android.support:appcompat-v7:25.0.0.
Searched in the following locations:
file:/Users/Mastermind/.m2/repository/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.pom
file:/Users/Mastermind/.m2/repository/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.jar
https://jcenter.bintray.com/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.pom
https://jcenter.bintray.com/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.jar
file:/Users/Mastermind/Desktop/ReactNative/f8app/node_modules/node_modules/react-native/android/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.pom
file:/Users/Mastermind/Desktop/ReactNative/f8app/node_modules/node_modules/react-native/android/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.jar
file:/Users/Mastermind/Library/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.pom
file:/Users/Mastermind/Library/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.jar
file:/Users/Mastermind/Library/Android/sdk/extras/google/m2repository/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.pom
file:/Users/Mastermind/Library/Android/sdk/extras/google/m2repository/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.jar
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 1 mins 20.189 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html