我正在尝试使用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
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/