【问题标题】:Gradle error trying to run nativescript app on android emulator on macGradle 错误尝试在 Mac 上的 android 模拟器上运行 nativescript 应用程序
【发布时间】:2019-06-28 02:58:02
【问题描述】:

我正在尝试使用 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().`

我尝试了以下方法:

  1. 运行./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
  1. 手动删除 .lock 文件并重新运行 tns run android 但我又遇到了同样的错误

  2. 运行

chmod  R+x/Volumes/My_SSD/myproject/platforms/tempPlugin/kinvey_nativescript_sdk

没有解决问题

该应用在 ios 模拟器上运行良好,但在 android 上运行良好

【问题讨论】:

    标签: android macos gradle nativescript kinvey


    【解决方案1】:

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

    我找到here 的解决方法是将项目移动到主文件夹(~)。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-09-04
      • 1970-01-01
      • 2021-01-26
      • 2017-09-11
      相关资源
      最近更新 更多