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 #12

Closed
Rudloff opened this issue Jul 5, 2018 · 2 comments
Closed

Crash #12

Rudloff opened this issue Jul 5, 2018 · 2 comments
Assignees

Comments

@Rudloff
Copy link

Rudloff commented Jul 5, 2018

Hello,

I'm trying to build v0.1.0-beta for F-Droid (#10).
gradle assemble seems to work correctly but then the app crashes when I launch it on my phone:

07-05 16:31:23.317 28649 28649 D AndroidRuntime: Shutting down VM
07-05 16:31:23.318 28649 28649 E AndroidRuntime: FATAL EXCEPTION: main
07-05 16:31:23.318 28649 28649 E AndroidRuntime: Process: com.waifusims.wanicchou, PID: 28649
07-05 16:31:23.318 28649 28649 E AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.waifusims.wanicchou/com.waifusims.wanicchou.SearchActivity}: java.lang.RuntimeException: Cannot create an instance of class data.room.notes.NoteViewModel
07-05 16:31:23.318 28649 28649 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
07-05 16:31:23.318 28649 28649 E AndroidRuntime: 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
07-05 16:31:23.318 28649 28649 E AndroidRuntime: 	at android.app.ActivityThread.access$900(ActivityThread.java:150)
07-05 16:31:23.318 28649 28649 E AndroidRuntime: 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
07-05 16:31:23.318 28649 28649 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:102)
07-05 16:31:23.318 28649 28649 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:148)
07-05 16:31:23.318 28649 28649 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:5417)
07-05 16:31:23.318 28649 28649 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
07-05 16:31:23.318 28649 28649 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
07-05 16:31:23.318 28649 28649 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
07-05 16:31:23.318 28649 28649 E AndroidRuntime: Caused by: java.lang.RuntimeException: Cannot create an instance of class data.room.notes.NoteViewModel
07-05 16:31:23.318 28649 28649 E AndroidRuntime: 	at android.arch.lifecycle.ViewModelProvider$AndroidViewModelFactory.create(ViewModelProvider.java:201)
07-05 16:31:23.318 28649 28649 E AndroidRuntime: 	at android.arch.lifecycle.ViewModelProvider.get(ViewModelProvider.java:134)
07-05 16:31:23.318 28649 28649 E AndroidRuntime: 	at android.arch.lifecycle.ViewModelProvider.get(ViewModelProvider.java:102)
07-05 16:31:23.318 28649 28649 E AndroidRuntime: 	at com.waifusims.wanicchou.SearchActivity.onCreate(SearchActivity.java:88)
07-05 16:31:23.318 28649 28649 E AndroidRuntime: 	at android.app.Activity.performCreate(Activity.java:6285)
07-05 16:31:23.318 28649 28649 E AndroidRuntime: 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
07-05 16:31:23.318 28649 28649 E AndroidRuntime: 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
07-05 16:31:23.318 28649 28649 E AndroidRuntime: 	... 9 more
07-05 16:31:23.318 28649 28649 E AndroidRuntime: Caused by: java.lang.NoSuchMethodException: <init> [class android.app.Application]
07-05 16:31:23.318 28649 28649 E AndroidRuntime: 	at java.lang.Class.getConstructor(Class.java:528)
07-05 16:31:23.318 28649 28649 E AndroidRuntime: 	at java.lang.Class.getConstructor(Class.java:492)
07-05 16:31:23.318 28649 28649 E AndroidRuntime: 	at android.arch.lifecycle.ViewModelProvider$AndroidViewModelFactory.create(ViewModelProvider.java:199)
07-05 16:31:23.318 28649 28649 E AndroidRuntime: 	... 15 more

(I am using Android 6.0.1.)

@Limegrass
Copy link
Owner

Hello Rudloff,
Thanks for the help! I'm sorry, I did not properly test installation with apk for the release.
I've resolved the issue locally on my device/AVDs in v0.1.1-beta (https://github.com/Limegrass/Wanicchou/releases/download/v0.1.1-beta/wanicchou-v0.1.1-beta.apk), let me know if the crash persists for you.

@Limegrass Limegrass self-assigned this Jul 6, 2018
@Rudloff
Copy link
Author

Rudloff commented Jul 6, 2018

v0.1.1-beta does not crash anymore. Thanks!

@Rudloff Rudloff closed this as completed Jul 6, 2018
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

2 participants