Start a new topic

Gradle error trying to run nativescript app on android emulator on mac

I'm trying to run a nativescript app on android using `tns run android`

I'm always getting gradle error:


FAILURE: Build failed with an exception.

* Where:

Build file: 


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().`


I tried the following:

1. Run `./gradlew --stacktrace` but I got this error:


Caused by: org.gradle.cache.LockTimeoutException: Timeout waiting to lock 

execution history cache 


adle/5.1.1/executionHistory). It is currently in use by another Gradle 


Owner PID: unknown

Our PID: 50331

Owner Operation: unknown

Our operation: 

Lock file: 




2. Deleted .lock files manually and re-ran `tns run android` but I got the same error again

3. Run 


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


Didn't fix the problem

The app runs fine on ios emulator and but not on android

1 person has this question
1 Comment

Hello Tarek,

I am not able to reproduce the issue when testing the Kinvey NativeScript SDK with a sample app, however, perhaps one of the suggestions in the following StackOverflow thread may help - the main Gradle cache should not interfere in this case, but clearing it wouldn't hurt, just cause some delay during your next build. Additionally, I would recommend that you delete the entire platforms folder and not only the lock files, and then try again. Another thing you might want to watch out for is running Android Studio while building the project.

If the above does not help, can you tell me which version of the NativeScript CLI you use, so I can investigate this further?



Login or Signup to post a comment