Android-runtime: tns run android fails at ':asbg:generateInterfaceNamesList'

Created on 14 Feb 2018  路  11Comments  路  Source: NativeScript/android-runtime

_From @acapozzoli on February 14, 2018 13:2_

Please, provide the details below:

Whenever i try to build android app, the system fails
I was on another project, but doubted my instalation. So i created a new app using the sidekick and the failure happens as well.

Did you verify this is a real problem by searching the [NativeScript Forum]

i checked the forum, only one other person reported something similar and it was closed (issue 3144). That person stated that it was a network problem, wich i never encountered before, and i dont think it is

Tell us about the problem

tns run android fails at ':asbg:generateInterfaceNamesList'

Which platform(s) does your issue occur on?

Android

Please provide the following version numbers that your issue occurs with:

  • CLI: 3.4.2
  • Cross-platform modules: 3.4.0
  • Runtime(s): android "3.4.1"

Please tell us how to recreate the issue in as much detail as possible.

  • create new app with sideckick
  • run or build android

Logs from sidekick error tab
[18-02-14 10:56:22.525] (Error) Error detected during LiveSync on 4d005e39521c8013 for C:\Users\Ariel\Documents\Git\TODO1\producto-base-movil\todo1-mobile. Error: Command gradlew.bat failed with exit code 1 Error output:

FAILURE: Build failed with an exception.

  • Where:
    Build file 'C:\Users\Ariel\Documents\Git\TODO1\producto-base-movil\todo1-mobile\platforms\android\build-tools\android-static-binding-generator\build.gradle' line: 63

  • What went wrong:
    Execution failed for task ':asbg:generateInterfaceNamesList'.

    Could not get unknown property 'jarFiles' for project ':asbg' of type org.gradle.api.Project.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

  • Get more help at https://help.gradle.org

BUILD FAILED in 2s

_Copied from original issue: NativeScript/nativescript-cli#3369_

bug needs more info

Most helpful comment

I had the same problem after adding some gradle flags as described in https://zeroturnaround.com/rebellabs/making-gradle-builds-faster/, namely:

   org.gradle.parallel=true

in my ~/.gradle/gradle.properties configuration file. Removing this flag allowed my android platform to build normally again.

All 11 comments

Hi @acapozzoli,
Sorry to hear you're having difficulties with running a project. Unfortunately, I can't reproduce the issue.
Could you run the tns build android --log trace command and post the output, as the information might help us resolve your issue.

i had the same issue hope this log file will help you

https://pastebin.com/AEmLpKYA

@ibrahim-abde please provide us with a small repo reproducing the issue, so we can resolve it. The log is great, but it's not enough for us to figure out what the problem is.

I created a new project using tns version 3.4.3 using the command : tns create whatToCook --ng
and running the command : tns build android
I changed nothing in the project files

Same problem here with latest stable version and freshly created tns create drawingExample --ng
Also happens with vanilla NS project created with tns create drawingExampleWithoutNG

Node: 8.10.0
Npm: 5.6.0
tns: 3.4.3
android: 3.4.2

SDK updated, only build tools update 28.0.0 RC1 available

I know it doesn't matter probably, but Ionic as well as React Native work out of the box :(

@creambyemute we are unable to reproduce the problem locally. One person who's had the problem had it solved on its own after restarting their workstation, not sure how or why, but it might be worth giving a shot.

@Pip3r4o I just completely purged npm/node and reinstalled with nvm and restarted the machine.

Still the same error. I'm out of ideas now

Tried it on my windows machine now, it works there.

Same versions of everything installed (node, npm, jdk, android sdk and tools all the same) as on my mac.

I had the same problem after adding some gradle flags as described in https://zeroturnaround.com/rebellabs/making-gradle-builds-faster/, namely:

   org.gradle.parallel=true

in my ~/.gradle/gradle.properties configuration file. Removing this flag allowed my android platform to build normally again.

Thanks @drangelod, this fixed it for me. I had added this to my ~/.gradle/gradle.properties to speed up builds, but apparently android runtime 3.4.1 has some issues with this. Not sure if fixed in 4.0.1.

@ddfreiling you can check with android@next whether you will be able to build your app in parallel mode as we have upgraded gradle to the latest version there.

Was this page helpful?
0 / 5 - 0 ratings