Ionic android side run issue - java

I am creating application in IONIC framework. I have done with all the basic installations and able to launch the application in browser using ionic serve command.
Now, I want to run the application in Real Android Device. I used following command to execute the same.
ionic cordova run android --device
Among the most of the issues I faced, I stuck at following error, which I could not able to tackle out.
CordovaError: Requirements check failed for JDK 1.8 or greater
I have centos 7.
I have installed JDK 1.8 in the system and set its path /usr/java/jdk1.8.0_161 to both JAVA_HOME and PATH.
Can any one help me.
Thank You

Related

Java runtime error on Flutter VScode for Mac

I used to work on Flutter months ago daily and when I came back I had this error showed while trying to debug:
Unable to locate a Java Runtime
After trying several solutions from Stackoverflow and redownload java from the internet I am still stick with this problem:
Kotlin could not find the required JDK tools in the Java installation '/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home' used by Gradle. Make sure Gradle is running on a JDK, not JRE.
I know there is a solution on Android Studio but can't get to it on VsCode. Where is the package I have to create the JDK so I can debug normally ?
Thanks in advance.

Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8

I'm trying to use a physical Android device to test/debug my React Native project.
I connected the device to my Windows 11 machine via USB and turned on Developer mode on the device but when I tried to run my project, I got an error stating the following:
Android Gradle plugin requires Java 11 to run. You are currently using
Java 1.8.
I downloaded and installed Java version 11 from this URL: https://jdk.java.net/java-se-ri/11
I then tried to set the version through:
Android Studio > File > Settings > Build, Execution, Deployment > Gradle > Gradle JDK
I also went into Environment Variables on my Windows 11 machine and pointed JAVA_HOME to the folder where Java version 11 is.
But no matter what I do, it doesn't work. If I run ./gradlew --version under Android folder, I see the following:
Any suggestions how to handle this and set the correct version of Java for Gradle in my React Native project?
P.S. Even if I try to use the Android simulator on my dev machine, I now get the same error i.e. asking for Java 11. So, at this point, I'm completely unable to run any -- even a brand new -- React Native project on an Android device or the simulator.
An easier solution might be to set the org.gradle.java.home variable in gradle.properties file.
To do that:
Locate the gradle.properties file in your project directory, create one if it's not present.
Add the variable like this
org.gradle.java.home = path/to/java11
Remember, no quotation marks in the path. And, point it towards the Java Installation directory, and not the bin folder.
Don't miss the double slash instead of single like below:
C:\\Program Files\\Java\\jdk-11.0.14
For those running into this issue with CI/CD pipelines,
just do this
image: openjdk:11-jdk
in the yml file for your pipeline.

Something weird is happening. Everytime I start Jenkins on my laptop, the Java 8 JDK folder in my laptop vanishes. Is that just me?

I installed Jenkins and ran builds for the selenium suite that I am building. I initiated it via cli and run multiple jobs and they all seem to run fine but after that I cant find the Java 8 JDK in the program files. This happened once before and i had to reinstall Java 8.
The issue was that I was installing Java automatically for the Jenkins run and this was overwriting the installation

How to set different java versions for different apps. on a windows PC?

I have 2 different apps, one of them is a java desktop app and the other one is a c# web app. which uses java applet in order to e-sign. The problem is desktop java app requires 1.5.0_14 and on the other hand web app. requires 1.7 and higher version of java.
I installed both java 1.5 and 1.7 versions on my PC. In order to run desktop java app., I go to C:\Progra~2\Java\jre1.5.0_14\bin and run javacpl to disable 1.7 and enable 1.5. Then I make a shortcut to javaws 1.5.0_14 to my desktop and add the jnlp of this java app (http://abc/appclient/tt.jnlp) to the target of javaws shortcut. After those settings, the java desktop app. runs.
Now I needed to also run the web app which requires 1.7 java. In order to run this app. properly Java 1.5 should be disabled, 1.7 enabled on the Java Control Panel settings. Problem is when you run this web app. the settings for 1.5.0_14 break down, I mean all of the java versions become enabled in javacpl under C:\Progra~2\Java\jre1.5.0_14\bin directory. If I restart my PC, I need to reset the java versions. Is there a way to make this happen without pain in the head?
I would be so glad if you can help me.
By the way, I tried to use batch files, etc. but did not succeed. Is there a permanent solution?
UPDATED:
Here is how I did it back then.
Here is what I do to solve my issue;
Uninstall the older Java -if there is- (in my case it is 1.5.0_14 )
install java equal/higher than 1.7 just to run e-sign on my web application
I prepared a VBScript in order to just run the desired jre version as follows and put jre1.5.0_14, jnlp file and VBScript on the same folder and make shortcut to the VBScript to run.
Set oShell = WScript.CreateObject("WSCript.shell") oShell.run "%comspec% /c D:\TMS\jre1.5.0_14\bin\javaws.exe D:\TMS\tt.jnlp -verbose", 1, True
Set oShell = Nothing
Best Regards.
Thanks in advance.

Difficulty in Installing Windows Azure Access Control Services filter plugin for java in eclipse

I'm trying to install the ACS plugin using this link http://msdn.microsoft.com/en-us/library/windowsazure/hh690946.aspx
But, I'm getting this error.
Cannot complete the install because some dependencies are not satisfiable
com.microsoftopentechnologies.acsfilter.feature.feature.group [0.2.0.201211010928] cannot be installed in this environment because its filter is not applicable.
Any idea what needs to be done?
I've Eclipse Juno
Are you on Windows or non-Windwows OS? As documented here this plugin requires Windows Azure SDK 1.8 in the machine and without it you will hit error:
This plugin requires Windows Azure SDK 1.8. This can be downloaded using the Web Platform Installer (WebPI) at http://go.microsoft.com/fwlink/?LinkID=252838. However, if you don’t have it installed, when you create your first Windows Azure deployment project, the plugin will automatically install Windows Azure SDK 1.8.
You can get an test Windows machine to give a try first and then learn how you can port the code to other machine. Not a clean way to achieve what you want but at least you have some option.

Categories