Error:(3, 22) compileSdkVersion android-22 requires compiling with JDK 7

博客内容提及按照图进行设置,但未明确设置内容及图的相关信息。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

按照下图进行设置即可

这里写图片描述

这里写图片描述

WARNING: A restricted method in java.lang.System has been called WARNING: java.lang.System::loadLibrary has been called by org.fusesource.hawtjni.runtime.Library in an unnamed module (file:/B:/apache-maven-3.6.0/lib/jansi-1.17.1.jar) WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module WARNING: Restricted methods will be blocked in a future release unless native access is enabled WARNING: A terminally deprecated method in sun.misc.Unsafe has been called WARNING: sun.misc.Unsafe::objectFieldOffset has been called by com.google.common.util.concurrent.AbstractFuture$UnsafeAtomicHelper (file:/B:/apache-maven-3.6.0/lib/guava-25.1-android.jar) WARNING: Please consider reporting this to the maintainers of class com.google.common.util.concurrent.AbstractFuture$UnsafeAtomicHelper WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future release [INFO] Scanning for projects... [INFO] [INFO] --------------------< com.example:stockmanagement >--------------------- [INFO] Building personnel 0.0.1-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ stockmanagement --- [INFO] Using &#39;UTF-8&#39; encoding to copy filtered resources. [INFO] Using &#39;UTF-8&#39; encoding to copy filtered properties files. [INFO] Copying 1 resource [INFO] Copying 7 resources [INFO] [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ stockmanagement --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 35 source files to C:\Users\14216\Desktop\ckgl\stockmanagement\target\classes [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] /C:/Users/14216/Desktop/ckgl/stockmanagement/src/main/java/com/example/stockmanagement/stockmanagementApplication.java:[3,25] 程序包com.sun.deploy.si不存在 [ERROR] /C:/Users/14216/Desktop/ckgl/stockmanagement/src/main/java/com/example/stockmanagement/stockmanagementApplication.java:[11,27] 程序包SingleInstanceImpl不存在 [INFO] 2 errors [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 5.651 s [INFO] Finished at: 2025-06-02T20:01:54+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project stockmanagement: Compilation failure: Compilation failure: [ERROR] /C:/Users/14216/Desktop/ckgl/stockmanagement/src/main/java/com/example/stockmanagement/stockmanagementApplication.java:[3,25] 程序包com.sun.deploy.si不存在 [ERROR] /C:/Users/14216/Desktop/ckgl/stockmanagement/src/main/java/com/example/stockmanagement/stockmanagementApplication.java:[11,27] 程序包SingleInstanceImpl不存在 [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException 进程已结束,退出代码1 怎么解决
06-03
[INFO] [INFO] --- scala-maven-plugin:3.3.2:compile (scala-compile-first) @ pg-sql-platform-report-analytics --- [WARNING] Expected all dependencies to require Scala version: 2.12.0 [WARNING] com.twitter:chill_2.12:0.10.0 requires scala version: 2.12.15 [WARNING] Multiple versions of scala libraries detected! [INFO] C:\Users\ASUS\Desktop\gouzheng\sql_editor\pg-sql-platform-report-analytics\src\main\java:-1: info: compiling [INFO] C:\Users\ASUS\Desktop\gouzheng\sql_editor\pg-sql-platform-report-analytics\src\main\scala:-1: info: compiling [INFO] Compiling 87 source files to C:\Users\ASUS\Desktop\gouzheng\sql_editor\pg-sql-platform-report-analytics\target\classes at 1749201456249 [ERROR] error: scala.reflect.internal.MissingRequirementError: object java.lang.Object in compiler mirror not found. [ERROR] at scala.reflect.internal.MissingRequirementError$.signal(MissingRequirementError.scala:17) [ERROR] at scala.reflect.internal.MissingRequirementError$.notFound(MissingRequirementError.scala:18) [ERROR] at scala.reflect.internal.Mirrors$RootsBase.$anonfun$getModuleOrClass$4(Mirrors.scala:54) [ERROR] at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:54) [ERROR] at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:45) [ERROR] at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:45) [ERROR] at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:66) [ERROR] at scala.reflect.internal.Mirrors$RootsBase.getClassByName(Mirrors.scala:102) [ERROR] at scala.reflect.internal.Mirrors$RootsBase.getRequiredClass(Mirrors.scala:105) [ERROR] at scala.reflect.internal.Definitions$DefinitionsClass.ObjectClass$lzycompute(Definitions.scala:267) [ERROR] at scala.reflect.internal.Definitions$DefinitionsClass.ObjectClass(Definitions.scala:267) [ERROR] at scala.reflect.internal.Definitions$DefinitionsClass.init(Definitions.scala:1447) [ERROR] at scala.tools.nsc.Global$Run.<init>(Global.scala:1126) [ERROR] at scala.tools.nsc.MainClass.doCompile(Main.scala:24) [ERROR] at scala.tools.nsc.Driver.process(Driver.scala:55) [ERROR] at scala.tools.nsc.Driver.main(Driver.scala:68) [ERROR] at scala.tools.nsc.Main.main(Main.scala) [ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) [ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:568) [ERROR] at scala_maven_executions.MainHelper.runMain(MainHelper.java:164) [ERROR] at scala_maven_executions.MainWithArgsInFile.main(MainWithArgsInFile.java:26)
06-08
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值