有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java SDK目录“C:\Users\User\AppData\Local\Android\SDK”不存在

有人能帮我解决这个问题吗

我在使用Ionic&;时出现此错误;cordova正在尝试构建andorid应用程序

我尝试了几种方法来解决这个问题,例如:

  • 重新安装JavaJDK8
  • 编辑计算机环境变量路径(JAVA_HOME、path…等)

但这些都不起作用:(

I当前使用:

  • Ionic@1.2.4
  • cordova@8.0.0
  • 视窗10
  • 节点。js@11.6.0
  • npm@6.5.0-下一个。0
  • jdk 1.8.0_271

Windows PowerShell Photo

 ⚡ lienlab@CCU_LAB  ~  Desktop  client  HybridApp_Zyxel  ionic build 安卓
Running command: "C:\Program Files\nodejs\node.exe" C:\Users\lienlab\Desktop\client\HybridApp_Zyxel\hooks\after_prepare\010_add_platform_class.js C:\Users\lienlab\Desktop\client\HybridApp_Zyxel
add to body class: platform-安卓
will push strings array {"name":"lang","titles":["English (US)","English (UK)"],"values":["en-us","en-gb"]}
安卓 preferences file was successfully generated
ANDROID_HOME=C:\Users\lienlab\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_271
Subproject Path: CordovaLib
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
        at build_93e2b48xftftse4tgevu6kz4n.run(C:\Users\lienlab\Desktop\client\HybridApp_Zyxel\platforms\安卓\build.gradle:138)


BUILD FAILED

Total time: 5.006 secs
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project '安卓'.
> The SDK directory 'C:\Users\User\AppData\Local\Android\sdk' does not exist.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
(node:14808) UnhandledPromiseRejectionWarning: 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 '安卓'.
> The SDK directory 'C:\Users\User\AppData\Local\Android\sdk' does not exist.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    at ChildProcess.whenDone (C:\Users\lienlab\Desktop\client\HybridApp_Zyxel\platforms\安卓\cordova\node_modules\cordova-common\src\superspawn.js:169:23)
    at ChildProcess.emit (events.js:188:13)
    at maybeClose (internal/child_process.js:978:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:265:5)
(node:14808) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:14808) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

共 (0) 个答案