简体   繁体   中英

Is it possible to run an ionic cordova build using Java 11 instead of Java 8?

I'm building an app using Ionic v5.2.7. When I try to run

ionic cordova emulate android

I get an error

Requirements check failed for JDK 8 ('1.8.*')! Detected version: 11.0.5

I've been trying to install Java 8, but it's long since been deprecated and Debian 10 doesn't trust the public key provided by the webupd8team PPA. I've tried a few workarounds for installing Java 8, but if at all possible I'd much rather run this using a more modern version of Java.

Any help would be greatly appreciated!

Update: I've tried to install Java 8 using several different guides, all of which lead to a Package 'oracle-java8-installer' has no installation candidate problem

我不知道主要问题的答案,但也许您可以尝试使用jabba安装 java 8(它类似于nvm但对于 java)

I know this question is old, but maybe the answer helps others. You can try to use sdkman to install different versions of Java and switch between them quickly.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM