Tns run android fails in company network
Platform: Android Java version: 1.8.0_144" tns version: 3.2.1 tns-core-modules.d.ts: version: 3.1.1 tns-android: version: 3.2.0
Hey, i created a demo project and tried to run it against a genymotion android emulator in my company network. When i run tns run android i get this error:
tns run android
Searching for devices...
Executing before-liveSync hook from C:\projects\apps\tnsDemo\hooks\before-liveSync\nativescript-angular-sync.js
Skipping prepare.
Building project...
Gradle build...
:config phase: createDefaultIncludeFiles
+found plugins: tns-core-modules-widgets
:config phase: createPluginsConfigFile
Creating product flavors include.gradle file in C:\projects\apps\tnsDemo\platforms\android/configurations folder...
:config phase: pluginExtend
+applying configuration from: C:\projects\apps\tnsDemo\platforms\android\configurations\include.gradle
+applying configuration from: C:\projects\apps\tnsDemo\platforms\android\configurations\tns-core-modules-widgets\include.gradle
:config phase: addAarDependencies
+adding dependency: C:\projects\apps\tnsDemo\platforms\android\libs\aar\widgets-release.aar
Exception in thread "main" java.lang.IllegalArgumentException: There are no parameters passed!
at com.ig.GetInterfaceNames.main(GetInterfaceNames.java:27)
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\projects\apps\tnsDemo\platforms\android\build-tools\android-static-binding-generator\build.gradle' line: 69
* What went wrong:
Execution failed for task ':asbg:generateInterfaceNamesList'.
> Process 'command 'C:\Program Files\Java\jdk1.8.0_144\bin\java.exe'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Unable to apply changes on device: 192.168.92.101:5555. Error is: Command gradlew.bat failed with exit code 1.
Executing after-watch hook from C:\projects\apps\tnsDemo\hooks\after-watch\nativescript-dev-typescript.js
Could not find a solution on stackOverflow
@FlorianSchmuck please provide exact steps to reproduce your problem, along with versions of components you're using, by using the command tns info inside your project folder.
- created a demo project with tns create demo --ng
- tns platform add android
- Start a genymotion emulator
- tns run android
tns info: All NativeScript components versions information Component │ Current version │ Latest version │ Information │ nativescript │ 3.2.1 │ 3.2.1 │ Up to date │ tns-core-modules │ 3.2.0 │ 3.2.0 │ Up to date │ tns-android │ 3.2.0 │ 3.2.0 │ Up to date │ tns-ios │ │ 3.2.0 │ Not installed │
It works with NativeScript Sidekick.
i have a similar issue. any solution for it? thanks
@denislearni, what is the exact error log that you are seeing?
@FlorianSchmuck, @denislearni please provide us with steps to reproduce so we can help you out with your issue.
Hey guys,
We have made some improvements in our proxy support. You can set proxy by calling tns proxy set command. You can read more information by checking the help of the command : tns help proxy set.
I'm closing this issue due to inactivity. Feel free to open another one in case you have additional issues.
hi, i am having the exact same exception, just that it doesnt even work with the sidekick
[18-02-14 09:39:59.957] (Error) Command gradlew.bat failed with exit code 1 Error output: Exception in thread "main" java.lang.IllegalArgumentException: There are no parameters passed! at com.ig.GetInterfaceNames.main(GetInterfaceNames.java:27)
FAILURE: Build failed with an exception.
-
Where: Build file 'C:\Users\Ariel\Documents\Git\demoProject\platforms\android\build-tools\android-static-binding-generator\build.gradle' line: 69
-
What went wrong: Execution failed for task ':asbg:generateInterfaceNamesList'.
Process 'command 'C:\Program Files\Java\jdk1.8.0_121\bin\java.exe'' finished with non-zero exit value 1
- Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
tns info:
nativescript │ 3.4.2
tns-core-modules │ 3.2.0
tns-android │ 3.2.0
tns-ios │ 3.2.0
Hey @acapozzoli , Have you set your Gradle proxy in the ~/.gradle/gradle.properties file? In case you are not, CLI will be able to work behind a proxy, but the gradle, that is building the application will not be able to connect to the network and download its resources. Can you try setting your proxy there and see if it works? The format of the file is:
systemProp.http.proxyHost=127.0.0.1
systemProp.http.proxyPort=8118
systemProp.https.proxyHost=127.0.0.1
systemProp.https.proxyPort=8118
hi, i tried what you said, i even created a new project with the sidekick to make sure it wasnt any config issue from me, and the sidekick throws this
[18-02-14 13:28:02.435] (Error) Error detected during LiveSync on 4d005e39521c8013 for C:\Users\Ariel\Documents\testApp\test. Error: Command gradlew.bat failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
-
Where: Build file 'C:\Users\Ariel\Documents\testApp\test\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
Hey @acapozzoli , Did you enter your own proxy settings in the mentioned file? Also can you try using cloud build with Sidekick and see if it works?