Skip to content

Unable to launch app using "tns run android --bundle --emulator" #3838

@NagShukl

Description

@NagShukl

Dear Team!!,...congratulations and appreciations for create a project like NativeScript - which was much needed. Further i tried creating 2 project - followed steps mentioned at https://blog.angular.io/apps-that-work-natively-on-the-web-and-mobile-9b26852495e7
added very small component to it.
everything goes well - application runs expected on browser but when i try running.
"tns run android --bundle --emulator"
it fails with below stack - please help me to move ahead and explore more to use NativeScript with full capacity.

Hook skipped because either bundling or livesync is in progress.
Preparing project...
Executing before-prepareJSApp hook from C:\JSR_Tene\POCS\napp\jsr-app\hooks\befo
re-prepareJSApp\nativescript-dev-webpack.js
Webpack compilation complete. Watching for file changes.
Webpack build done!
Project successfully prepared (Android)
Executing after-prepare hook from C:\JSR_Tene\POCS\napp\jsr-app\hooks\after-prep
are\nativescript-dev-webpack.js
Building project...
Gradle build...
+ setting applicationId
+ applying user-defined configuration from C:\JSR_Tene\POCS\napp\jsr-ap
p\App_Resources\Android\app.gradle
+ adding nativescript runtime package dependency: nativescript-optimize
d-with-inspector
+ adding aar plugin dependency: C:\JSR_Tene\POCS\napp\jsr-app\node_modu
les\tns-core-modules-widgets\platforms\android\widgets-release.aar
Exception in thread "main" java.lang.SecurityException: java.lang.AbstractString
Builder - protected system package 'java.lang'
at java.lang.ClassLoader.checkClassName(ClassLoader.java:291)
at java.lang.ClassLoader.defineClass(ClassLoader.java:333)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:15
4)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:727)
at java.net.URLClassLoader.access$400(URLClassLoader.java:95)
at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java:1182)
at java.security.AccessController.doPrivileged(AccessController.java:595
)
at java.net.URLClassLoader.findClass(URLClassLoader.java:602)
at java.lang.ClassLoader.loadClassHelper(ClassLoader.java:797)
at java.lang.ClassLoader.loadClass(ClassLoader.java:771)
at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:1220)
at java.lang.ClassLoader.loadClass(ClassLoader.java:752)
at org.nativescript.staticbindinggenerator.GetInterfaceNames.generateInt
erfaceNames(GetInterfaceNames.java:59)
at org.nativescript.staticbindinggenerator.GetInterfaceNames.generateInt
erfaceFile(GetInterfaceNames.java:32)
at org.nativescript.staticbindinggenerator.Main.main(Main.java:42)

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:runSbg'.

Process 'command 'C:\JSRLearning\java8\sdk\bin\java.exe'' finished with non-ze
ro exit value 1

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

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

BUILD FAILED in 32s
Unable to apply changes on device: emulator-5554. Error is: Command gradlew.bat
failed with exit code 1.
Executing after-watch hook from C:\JSR_Tene\POCS\napp\jsr-app\hooks\after-watch
nativescript-dev-typescript.js
Executing after-watch hook from C:\JSR_Tene\POCS\napp\jsr-app\hooks\after-watch
nativescript-dev-webpack.js
Stopping webpack watch
Executing after-watch hook from C:\JSR_Tene\POCS\napp\jsr-app\hooks\after-watch
nativescript-dev-typescript.js
Executing after-watch hook from C:\JSR_Tene\POCS\napp\jsr-app\hooks\after-watch
nativescript-dev-webpack.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions