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

Crash on Android #7

Closed
nnieto opened this issue Sep 19, 2016 · 2 comments
Closed

Crash on Android #7

nnieto opened this issue Sep 19, 2016 · 2 comments

Comments

@nnieto
Copy link

nnieto commented Sep 19, 2016

When I try to open the app, after this crash the app can not navigate to another page

com.tns.NativeScriptException:
Calling js method getView failed

Error: Building UI from XML. @file:///app/views/recipesList/recipesList.xml:48:39
���Module '/data/data/org.nativescript.wosapp/files/app/tns_modules/nativescript-web-image-cache' not found for element 'nativescript-web-image-cache:WebImage'.
���java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference
android.view.ViewConfiguration.get(ViewConfiguration.java:359)
android.view.View.(View.java:3580)
android.widget.ImageView.(ImageView.java:126)
com.facebook.drawee.view.DraweeView.(DraweeView.java:52)
com.facebook.drawee.view.GenericDraweeView.(GenericDraweeView.java:37)
com.facebook.drawee.view.SimpleDraweeView.(SimpleDraweeView.java:57)
com.tns.Runtime.callJSMethodNative(Native Method)
com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:865)
com.tns.Runtime.callJSMe

@nnieto nnieto closed this as completed Sep 19, 2016
@karan1149
Copy link

Seem to be getting a similar error on app launch, causes the app to crash:

com.tns.NativeScriptException:
Calling js method getView failed

EXCEPTION: Error in pages/groups/groups.html:5:8
ORIGINAL EXCEPTION: TypeError: Cannot set property 'width' of null
ORIGINAL STACKTRACE:
TypeError: Cannot set property 'width' of null
at StylePropertyChangedHandler.ViewStyler.setNativeLayoutParamsProperty as _applyProperty
at StylePropertyChangedHandler.applyProperty (/data/data/org.nativescript.squadstats/files/app/tns_modules/ui/styling/style.js:1238:14)
at Style._applyStyleProperty (/data/data/org.nativescript.squadstats/files/app/tns_modules/ui/styling/style.js:1003:25)
at Style._applyProperty (/data/data/org.nativescript.squadstats/files/app/tns_modules/ui/styling/style.js:966:14)
at Style._onPropertyChanged (/data/data/org.nativescript.squadstats/files/app/tns_modules/ui/styling/style.js:947:14)
at Style.DependencyObservable._setValueInternal (/data/data/org.nativescript.squadstats/files/app/tns_modules/ui/core/dependency-observable.js:305:18)
at Style.DependencyObservable._setValue (/data/data/org.nativescript.squadstats/files/app/tns_modules/ui/core/dependency-observable.js:138:14)
at onLayoutParamsChanged (/data/data/org.nativescript.squadstats/files/app/tns_modules/ui/styling/style.js:150:11)
at Style.DependencyObservable._onPropertyChanged (/data/data/org.nativescript.squadstats/files/app/tns_modules/ui/core/dependency-observable.js:211:13)
at Style._onPropertyChanged (/data/data/org.nativescript.squadstats/files/app/tns_modules/ui/styling/style.js:945:45)
ERROR CONTEXT:
[object Object]
File: "/data/data/org.nativescript.squadstats/files/app/tns_modules/@angular/core/src/linker/view.js, line: 365, column: 16

StackTrace:
Frame: function:'DebugAppView.rethrowWithContext', file:'/data/data/org.nativescript.squadstats/files/app/tns_modules/@angular/core/src/linker/view.js', line: 365, column: 17
Frame: function:'DebugAppView.create', file:'/data/data/org.nativescript.squadstats/files/app/tns_modules/@angular/core/src/linker/view.js', line: 311, column: 18
Frame: function:'TemplateRef
.createEmbeddedView', file:'/data/data/org.nativescript.squadstats/files/app/tns_modules/@angular/core/src/linker/template_ref.js', line: 64, column: 14
Frame: function:'ViewContainerRef_.createEmbeddedView', file:'/data/data/org.nativescript.squadstats/files/app/tns_modules/@angular/core/src/linker/view_container_ref.js', line: 106, column: 35
Frame: function:'ListViewComponent.onItemLoading', file:'/data/data/org.nativescript.squadstats/files/app/tns_modules/nativescript-angular/directives/list-view-comp.js', line: 71, column: 35
Frame: function:'Observable.notify', file:'/data/data/org.nativescript.squadstats/files/app/tns_modules/data/observable/observable.js', line: 155, column: 32
Frame: function:'ListViewAdapter.getView', file:'/data/data/org.nativescript.squadstats/files/app/tns_modules/ui/list-view/list-view.js', line: 162, column: 28

at com.tns.Runtime.callJSMethodNative(Native Method)
at com.tns.Runtime.dispatchCallJSMethodNative(Runtime.java:865)
at com.tns.Runtime.callJSMethodImpl(Runtime.java:730)
at com.tns.Runtime.callJSMethod(Runtime.java:716)
at com.tns.Runtime.callJSMethod(Runtime.java:697)
at com.tns.Runtime.callJSMethod(Runtime.java:687)
at com.tns.gen.android.widget.BaseAdapter_frnal_ts_helpers_l55_c38__ListViewAdapter.getView(android.widget.BaseAdapter.java)
at android.widget.AbsListView.obtainView(AbsListView.java:2360)
at android.widget.ListView.makeAndAddView(ListView.java:1972)
at android.widget.ListView.fillDown(ListView.java:704)
at android.widget.ListView.fillFromTop(ListView.java:765)
at android.widget.ListView.layoutChildren(ListView.java:1716)
at android.widget.AbsListView.onLayout(AbsListView.java:2161)
at android.view.View.layout(View.java:17520)
at android.view.ViewGroup.layout(ViewGroup.java:5612)
at org.nativescript.widgets.CommonLayoutParams.layoutChild(CommonLayoutParams.java:189)
at org.nativescript.widgets.GridLayout.onLayout(GridLayout.java:353)
at android.view.View.layout(View.java:17520)
at android.view.ViewGroup.layout(ViewGroup.java:5612)
at org.nativescript.widgets.CommonLayoutParams.layoutChild(CommonLayoutParams.java:189)
at org.nativescript.widgets.GridLayout.onLayout(GridLayout.java:353)
at android.view.View.layout(View.java:17520)
at android.view.ViewGroup.layout(ViewGroup.java:5612)
at org.nativescript.widgets.CommonLayoutParams.layoutChild(CommonLayoutParams.java:189)
at org.nativescript.widgets.ContentLayout.onLayout(ContentLayout.java:73)
at android.view.View.layout(View.java:17520)
at android.view.ViewGroup.layout(ViewGroup.java:5612)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at android.view.View.layout(View.java:17520)
at android.view.ViewGroup.layout(ViewGroup.java:5612)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1741)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1585)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1494)
at android.view.View.layout(View.java:17520)
at android.view.ViewGroup.layout(ViewGroup.java:5612)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:323)
at android.widget.FrameLayout.onLayout(FrameLayout.java:261)
at com.android.internal.policy.DecorView.onLayout(DecorView.java:724)
at android.view.View.layout(View.java:17520)
at android.view.ViewGroup.layout(ViewGroup.java:5612)
at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2342)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2069)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1246)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6301)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:871)
at android.view.Choreographer.doCallbacks(Choreographer.java:683)
at android.view.Choreographer.doFrame(Choreographer.java:619)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:857)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6077)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:865)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)

@kmuthukrishnan
Copy link

Hi, Iam facing the same runtime issue. How were you able to solve it?

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

3 participants