Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tns run android --emulator #55

Closed
RainingNight opened this issue Feb 18, 2016 · 7 comments
Closed

tns run android --emulator #55

RainingNight opened this issue Feb 18, 2016 · 7 comments

Comments

@RainingNight
Copy link

java.lang.RuntimeException: Unable to start activity ComponentInfo{org.nativescript.groceries/com.tns.NativeScriptActivity}: com.tns.NativeScriptException:
Calling js method onCreate failed

TypeError: Cannot read property 'widgets' of undefined
File: "/data/data/org.nativescript.groceries/files/app/tns_modules/ui/frame/frame.js, line: 327, column: 39

StackTrace:
Frame: function:'NativeActivity.onCreate', file:'/data/data/org.nativescript.groceries/files/app/tns_modules/ui/frame/frame.js', line: 327, column: 40

at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2448)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2510)
at android.app.ActivityThread.access$1200(ActivityThread.java:163)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1371)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5595)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)

Caused by: com.tns.NativeScriptException:
Calling js method onCreate failed

TypeError: Cannot read property 'widgets' of undefined
File: "/data/data/org.nativescript.groceries/files/app/tns_modules/ui/frame/frame.js, line: 327, column: 39

StackTrace:
Frame: function:'NativeActivity.onCreate', file:'/data/data/org.nativescript.groceries/files/app/tns_modules/ui/frame/frame.js', line: 327, column: 40

at com.tns.Platform.callJSMethodNative(Native Method)
at com.tns.Platform.dispatchCallJSMethodNative(Platform.java:812)
at com.tns.Platform.callJSMethod(Platform.java:711)
at com.tns.Platform.callJSMethod(Platform.java:690)
at com.tns.Platform.callJSMethod(Platform.java:680)
at com.tns.NativeScriptActivity.onCreate(NativeScriptActivity.java:1574)
at android.app.Activity.performCreate(Activity.java:6100)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1109)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2401)
... 10 more
@Mitko-Kerezov
Copy link
Contributor

@leshin seems like you are trying to build the project with a difference in versions between the tns-core-modules and the tns-android runtime - can you check and see what's written in your package.json

@gadonski
Copy link

i had the same problem

"nativescript": {
"id": "com.tjvantoll.groceries",
"tns-ios": {
"version": "1.5.2"
},
"tns-android": {
"version": "1.5.1"
}
}

@rosen-vladimirov
Copy link
Contributor

@gadonski , can you check the version of your tns-core-modules under dependencies section of your package.json - is it 1.5.x ?

@gadonski
Copy link

Yep... tns-core-modules - 1.5.1

"nativescript": {
        "id": "com.tjvantoll.groceries",
        "tns-ios": {
            "version": "1.5.2"
        },
        "tns-android": {
            "version": "1.5.1"
        }
    },
    "dependencies": {
        "email-validator": "^1.0.3",
        "nativescript-iqkeyboardmanager": "^1.0.0",
        "nativescript-social-share": "^1.1.2",
        "nativescript-floatingactionbutton": "^0.1.4",
        "nativescript-telerik-ui": "0.2.3",
        "nativescript-unit-test-runner": "^0.2.8",
        "tns-core-modules": "1.5.1"
    },

@marcoziegaus
Copy link

I've got i working by changing "tns-core-modules": "1.5.1" in .../sample-Groceries/package.json to "1.6.0" before building/running the tutorial for the first time

@tjvantoll
Copy link
Contributor

@leshin I just updated this repo to use 1.6 throughout. Could you pull down the changes, try again, and let us know if you’re still having the same issue?

Thanks.

@RainingNight
Copy link
Author

@tjvantoll Yeah, it's ok. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants