I did the following and I am getting the error message
I installed Apache Ant using the command npm install apache ant
I updated my Cordova to the latest version, 3.4.0 by the command npm -g update phonegap
I updated the system variables so the /bin directory of Java SDK and the /bin of Apache Ant is included in the PATH
I updated my Android SDK and included Google API Ver 19
And I am still getting the following error message! You can open the image on new tab or save the image so you can view the message more clearly
I tried running check_reqs and it only gave me one line which was
"An error occuured while listing Android targets"
"I updated my Cordova to the latest version, 3.4.0 by the command npm -g update phonegap"
Cordova and PhoneGap are two different things in terms of command line clients. Have you run npm -g install cordova? You need to have both for the phonegap client to work with local builds.
Related
I am trying to run a react native app on a m1 mac, generated with react-native-starter-kit.enter link description here. When I run the app with npx react-native run-android, I get the following error
error Failed to install the app. Please accept all necessary Android
SDK licenses using Android SDK Manager:
"$ANDROID_HOME/tools/bin/sdkmanager --licenses".
I tried to run the sdkmanager as following
export JAVA_HOME=/Applications/Android\ Studio.app/Contents/jre/Contents/Home
cd ~/Library/Android/sdk/tools/bin/
./sdkmanager --licenses
I get an Error
Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
Then I tried this JAVA_HOME
export JAVA_HOME=$(/usr/libexec/java_home -v 1.8)
cd ~/Library/Android/sdk/tools/bin/
./sdkmanager --licenses
And it works, All SDK package licenses accepted.======] 100% Computing updates...
But when I run npx react-native run-android after that, I still have a licence error
Failed to install the app. Please accept all necessary Android SDK licenses using Android SDK Manager
I have the feeling I am accepting the licenses in the wrong JDK. Any idea?
You should make sure that you set up you development envoirement the correct way.
The Official Guide explains it step by step.
For you paragraph 2 (Install the Android SDK) should be helpful
I've been trying to launch a basic app using react native. So far, I've followed the guide here, https://reactnative.dev/docs/environment-setup, for react-native CLI quickstart. I'm using Windows, and using bash with Windows linux subsystem (ubuntu)
I've launched metro, but when I try the command,
npx react-native run-android --no-jetifier
I get the following error,
info JS server already running.
info Installing the app...
"ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081"
I've tried setting a path to the JRE location used by Android Studio, and also setting the path to C:\Program Files\Java\jre1.8.0_241, restarted etc.
Any insights?
I should add, when I try to launch the app through android studio (on an emulator) it gives this error,
Unable to load script. Make sure you're either running a metro server (run 'react-native start') or that your bundle 'index.android.bundle' is packaged correctly for release
Set JAVA_HOME but also, consider adding the bin to the PATH system variable
C:\Program Files\Java\jre1.8.0_241\bin
Find more information here https://confluence.atlassian.com/doc/setting-the-java_home-variable-in-windows-8895.html
I tried to install OpenJDK 12 in jenkins, with *.tar.gz installer but i get the error Cannot run program "/bin/java"
JAVA_HOME=/var/jenkins_home/tools/hudson.model.JDK/java12
Note I created the directory "hudson.model.JDK" myself.
here is the tool configuration
full error log
JDK 12 has one bug logged
https://bugs.openjdk.java.net/browse/JDK-6746185
according to this Malformed URL is invalid, So jenkins is not able to download JDK
Simple solution is download JDk from this link, or whatever you like and add Open JDK in jenkins as I do
https://download.java.net/java/GA/jdk12.0.1/69cfe15208a647278a19ef0990eea691/12/GPL/openjdk-12.0.1_linux-x64_bin.tar.gz
Download JDK and extract it to one folder.
Manage Jenkins> Global Configurations> Add JDK>
1. Name: Open JDK(Or whatever you want)
2. JAVA_HOME: \Open_JDK\
like in my case
E:\Open_JDK\openjdk-11.0.2_windows-x64_bin\jdk-11.0.2
in jenkins
Save and exit, everything working fine
Happy Jenkins, Happy to help
JDK Tool Plugin in Jenkins only support the automatic download of version up to Java SDK 1.9 so I will write the process made by me in order to config OpenJDK-11(I'm using this specific version but another version can be used) in a Jenkins running in a Docker container:
Login into the host server where the docker container is running using SSH
service.
Check the running containers with the command: docker ps
Get in into the Jenkins container with the command(in my case, the container name is "jenkins"): docker exec -it containerName /bin/bash
Download the OpenJDK 11: cd /usr/local && wget https://download.java.net/openjdk/jdk11/ri/openjdk-11+28_linux-x64_bin.tar.gz
Unpack the downloaded file: tar -zxvf openjdk-11+28_linux-x64_bin.tar.gz
Now you will have a folder "jdk-11" under /usr/local.
Go to Global Tools Configuration in Jenkins and set up the SDK config like the showed image:
Now you can make use of a different version of Java SDK in Jenkins builds using as label "Java SE 11".
JDK 12 is not yet supported by Jenkins.
Link: https://jenkins.io/doc/administration/requirements/java/
I am getting the following error when trying to install Android Studio 3.1 Preview 2 on Windows:
Error: CreateProcess error=216, This version of %1 is not compatible
with the version of Windows you're running. Check your computer's
system information and then contact the software publisher.
I have tried to install the following - but still didn't help:
Install jdk1.8.
I also tried the following in Android Studio:
File->Project Structure->SDK Location (select your directory where the JDK is located, by default Studio uses embedded JDK) -> Click OK
But for some reason this produces error=216.
How can i update a cordova lib for my Android Application from Version 2.1.0 to 5.1.1 i can't download the .jar file from the offical webpage
using bellow commands
npm install -g cordova
using this command latest version are installed this command fire in to your CMD
And if you want to down your cordova version 5.0 to 3.6.3 or any other cordova version then use bellow command
npm install -g cordova#3.6.3-0.2.13