Gradle NoclassDefFoundError on ubuntu - 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

Related

FAILURE: Build failed with an exception React-native

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.

cordova don'd build to android

I'm new at Cordova and I'm trying to solve this for two days.
When I hit the command: Cordova run android --device this shows up:
C:\Users\Arthur\nameoftheapp>cordova run android --device
ANDROID_HOME=C:\Users\Arthur\Downloads\Aprender\adt-bundle-windows-x86_64-201407
02\adt-bundle-windows-x86_64-20140702\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_172
Subproject Path: CordovaLib
Incremental java compilation is an incubating feature.
BUILD FAILED
Total time: 7.354 secs
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'android'.
Could not resolve all dependencies for configuration ':_debugApkCopy'.
Could not find com.android.support:appcompat-v7:27.0.0.
Required by:
:android:unspecified
Could not find com.android.support:support-v4:27.0.0.
Required by:
:android:unspecified
Could not find com.android.support:support-v4:27.0.0.
Required by:
:android:unspecified > com.google.android.gms:play-services-gcm:9.8.0 >
com.google.android.gms:play-services-basement:9.8.0
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
Error: cmd: 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 ':_debugApkCopy'.
Could not find com.android.support:appcompat-v7:27.0.0.
Required by:
:android:unspecified
Could not find com.android.support:support-v4:27.0.0.
Required by:
:android:unspecified
Could not find com.android.support:support-v4:27.0.0.
Required by:
:android:unspecified > com.google.android.gms:play-services-gcm:9.8.0 >
com.google.android.gms:play-services-basement:9.8.0
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
I tried to change the version in the build.gradle to another but when I compile, it changes back.
Do you used many cordova plugin with you'r application ?
if yes you can handle this with this plugin : https://github.com/dpa99c/cordova-android-support-gradle-release

Gradle build error: Could not resolve all dependencies for configuration ':classpath'

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 am getting issue after update all plugin in Phone Gap Projects in Android Platform from Android Studio

I am getting issue after update all plugin in Phone Gap Projects in Android Platform from Android Studio.
when i am trying to build the app that time i am getting this issue, for details please check my attached image .
Issue is:
Error: cmd: 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 ':_debugApkCopy'.
Could not find com.google.firebase:firebase-messaging:11.0.1.
Required by:
project :
Could not find com.google.firebase:firebase-core:11.0.1.
Required by:
project :
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
enter image description here

Something went wrong with Cordova when trying to build

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.

Categories

Resources