NativeScript: Followed the steps in Chapter 1—Getting Up and Running... but getting build error while run

Please, provide the details below:

D:\Source-Code\NativeScript\sample-Groceries>tns run android --emulator
Starting Android emulator with image N4
Waiting for emulator device initialization....
Executing before-prepare hook from D:\Source-Code\NativeScript\sample-Groceries\
hooks\before-prepare\nativescript-dev-typescript.js
Found peer TypeScript 1.8.10
Project successfully prepared (android)

:config phase:  createDefaultIncludeFiles
        +found plugins: tns-core-modules-widgets

:config phase:  createPluginsConfigFile
         Creating product flavors include.gradle file in D:\Source-Code\NativeSc
ript\sample-Groceries\platforms\android/configurations folder...

:config phase:  pluginExtend
        +applying configuration from: D:\Source-Code\NativeScript\sample-Groceri
es\platforms\android\configurations\include.gradle
        +applying configuration from: D:\Source-Code\NativeScript\sample-Groceri
es\platforms\android\configurations\tns-core-modules-widgets\include.gradle

:config phase:  copyAarDependencies

:config phase:  addAarDependencies
        +adding dependency: D:\Source-Code\NativeScript\sample-Groceries\platfor
ms\android\libs\aar\widgets-release.aar
Incremental java compilation is an incubating feature.
:preBuild UP-TO-DATE
:preF0DebugBuild UP-TO-DATE
:checkF0DebugManifest
:preF0ReleaseBuild UP-TO-DATE
:prepareComAndroidSupportAppcompatV72221Library UP-TO-DATE
:prepareComAndroidSupportSupportV42221Library UP-TO-DATE
:prepareGroceriesRuntimeUnspecifiedLibrary UP-TO-DATE
:prepareWidgetsReleaseLibrary UP-TO-DATE
:prepareF0DebugDependencies
:compileF0DebugAidl UP-TO-DATE
:compileF0DebugRenderscript UP-TO-DATE
:generateF0DebugBuildConfig UP-TO-DATE
:cleanLocalAarFiles
:ensureMetadataOutDir
:collectAllJars
:setProperties
:asbg:generateInterfaceNamesList
Exception in thread "main" java.net.MalformedURLException: no !/ in spec
        at java.net.URL.<init>(URL.java:627)
        at java.net.URL.<init>(URL.java:490)
        at java.net.URL.<init>(URL.java:439)
        at com.ig.GetInterfaceNames.getClassLoader(GetInterfaceNames.java:94)
        at com.ig.GetInterfaceNames.generateInterfaceNames(GetInterfaceNames.jav
a:51)
        at com.ig.GetInterfaceNames.main(GetInterfaceNames.java:35)
Caused by: java.lang.NullPointerException: no !/ in spec
        at sun.net.www.protocol.jar.Handler.parseAbsoluteSpec(Handler.java:171)
        at sun.net.www.protocol.jar.Handler.parseURL(Handler.java:151)
        at java.net.URL.<init>(URL.java:622)
        ... 5 more
:asbg:generateInterfaceNamesList FAILED

FAILURE: Build failed with an exception.

* Where:
Build file 'D:\Source-Code\NativeScript\sample-Groceries\platforms\android\build
-tools\android-static-binding-generator\build.gradle' line: 33

* What went wrong:
Execution failed for task ':asbg:generateInterfaceNamesList'.
> Process 'command 'C:\Program Files\Java\jdk1.8.0_112\bin\java.exe'' finished w
ith 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.

BUILD FAILED

Total time: 17.947 secs
Command D:\Source-Code\NativeScript\sample-Groceries\platforms\android\gradlew.b
at failed with exit code 1
# run android
┌────────────────┬──────────────────────────────────────────────────────────┐
│ Usage          │ Synopsis                                                 │
│ Run on all     │ $ tns run android [--key-store-path <File Path> --key    │
│ connected      │ -store-password <Password> --key-store-alias <Name> -    │
│ devices and    │ -key-store-alias-password <Password>] [--release] [-     │
│ running        │ -justlaunch]                                             │
│ emulators      │                                                          │
│ Run on a       │ $ tns run android --device <Device ID> [--key-store-path │
│ selected       │ <File Path> --key-store-password <Password> --key-store  │
│ connected      │ -alias <Name> --key-store-alias-password <Password>] [-  │
│ device or      │ -release] [--justlaunch]                                 │
│ running        │                                                          │
│ emulator       │                                                          │
│ Start an       │ $ tns run android --emulator [<Emulator Options>] [--key │
│ emulator and   │ -store-path <File Path> --key-store-password <Password>  │
│ run the app    │ --key-store-alias <Name> --key-store-alias-password      │
│ inside it      │ <Password>] [--release] [--justlaunch]                   │
└────────────────┴──────────────────────────────────────────────────────────┘

Runs your project on a connected Android device or in a native Android emulator,
 if configured. This is shorthand for prepare, build and deploy. While your app
is running, prints the output from the application in the console.

### Options

    * --watch - If set, when you save changes to the project, changes are automa
tically synchronized to the connected device.
    * --device - Specifies a connected device on which to run the app.
    * --emulator - If set, runs the app in a native emulator for the target plat
form, if configured. When set, you can also set any other valid combination of e
mulator options as listed by $ tns help emulate android.
    * --release - If set, produces a release build. Otherwise, produces a debug
build. When set, you must also specify the --key-store-* options.
    * --key-store-path - Specifies the file path to the keystore file (P12) whic
h you want to use to code sign your APK. You can use the --key-store-* options a
long with --release to produce a signed release build. You need to specify all -
-key-store-* options.
    * --key-store-password - Provides the password for the keystore file specifi
ed with --key-store-path. You can use the --key-store-* options along with --rel
ease to produce a signed release build. You need to specify all --key-store-* op
tions.
    * --key-store-alias - Provides the alias for the keystore file specified wit
h --key-store-path. You can use the --key-store-* options along with --release t
o produce a signed release build. You need to specify all --key-store-* options.

    * --key-store-alias-password - Provides the password for the alias specified
 with --key-store-alias-password. You can use the --key-store-* options along wi
th --release to produce a signed release build. You need to specify all --key-st
ore-* options.
    * --justlaunch - If set, does not print the application output in the consol
e.

Attributes

* <Device ID> is the index or name of the target device as listed by $ tns d

evice android * <Emulator Options> is any valid combination of options as listed by $ tns help emulate android

Did you verify this is a real problem by searching Stack Overflow and the other open issues in this repo?

Tell us about the problem

Please, ensure your title is less than 63 characters long and starts with a capital letter.

Which platform(s) does your issue occur on?

iAndroid

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

  • CLI: 2.3.0
  • Cross-platform modules: 2.3.0
  • Runtime(s): 2.3.0
  • Plugin(s): “name”: “Groceries”, “version”: “1.0.0”,

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

tns platform remove android tns platform add android tns build android or tns run android --emulator

Is there code involved? If so, please share the minimal amount of code needed to recreate the problem. NO…

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 16 (5 by maintainers)

Most upvoted comments

do you have a special character in one of your project folders?

Hi NIck,

Since I’m busy, I could not continue this, surely, will let you know, once i get time.

On Tue, Dec 20, 2016 at 1:07 PM, Nick Iliev notifications@github.com wrote:

Closed #3091 https://github.com/NativeScript/NativeScript/issues/3091.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/NativeScript/NativeScript/issues/3091#event-899722285, or mute the thread https://github.com/notifications/unsubscribe-auth/AWRSwkU783i5-BZXLsZLMrF1TwrsLTp-ks5rJ4XRgaJpZM4KxUwV .