gpt4 book ai didi

android - 尝试在Mac上的Android模拟器上运行NativeScript应用程序的Gradle错误

转载 作者:行者123 更新时间:2023-12-03 05:35:09 26 4
gpt4 key购买 nike

我正在尝试使用tns run android在android上运行nativescript应用

我总是收到gradle错误:

FAILURE: Build failed with an exception.

* Where:

Build file:

'/Volumes/My_SSD/myproject/platforms/tempPlugin/kinvey_nativescript_sdk/bui
ld.gradle' line: 28

* What went wrong:

A problem occurred evaluating root project '`kinvey_nativescript_sdk`'.
> Failed to apply plugin [class 'org.gradle.api.plugins.BasePlugin']
> Could not create service of type OutputFilesRepository using ExecutionServices.createOutputFilesRepository().`

我尝试了以下方法:
  • 运行./gradlew --stacktrace,但出现此错误:
  • Caused by: org.gradle.cache.LockTimeoutException: Timeout waiting to lock 
    execution history cache
    (/Volumes/My_SSD/myproject/platforms/tempPlugin/kinvey_nativescript_sdk/.gr
    adle/5.1.1/executionHistory). It is currently in use by another Gradle
    instance.
    Owner PID: unknown
    Our PID: 50331
    Owner Operation: unknown
    Our operation:
    Lock file:
    /Volumes/My_SSD/myproject/platforms/tempPlugin/kinvey_nativescript_sdk/.gra
    dle/5.1.1/executionHistory/executionHistory.lock
  • 手动删除.lock文件,然后重新运行tns run android,但我再次遇到相同的错误
  • 运行
  • chmod  R+x/Volumes/My_SSD/myproject/platforms/tempPlugin/kinvey_nativescript_sdk

    没有解决问题

    该应用程序可以在ios模拟器上正常运行,但不能在android上运行

    最佳答案

    我遇到了同样的问题,看起来与this Gradle issue有关。

    我发现here的解决方法是将项目移到主文件夹(〜)。

    关于android - 尝试在Mac上的Android模拟器上运行NativeScript应用程序的Gradle错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56800409/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com