Gradle 在 mac 上的 android 模拟器上尝试 运行 nativescript 应用时出错
Gradle error trying to run nativescript app on android emulator on mac
我正在尝试使用 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 的解决方法是将项目移动到主文件夹 (~)。
我正在尝试使用 tns run android
我总是收到 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 的解决方法是将项目移动到主文件夹 (~)。