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 while initializing library #10

Open
vikram731 opened this issue Aug 29, 2020 · 0 comments
Open

Crash while initializing library #10

vikram731 opened this issue Aug 29, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@vikram731
Copy link

I am initializing the library like this (in JAVA) -

UnsplashPhotoPicker.INSTANCE.init(
getApplication(), // application
"xxxxxxxx",
"xxxxxxxx",
20
);

It works most of the time but I have seen crashes in many devices with below stacktrace. Am I initializing the library in some wrong way or is it a bug?

Fatal Exception: java.lang.RuntimeException
Unable to start activity ComponentInfo{com.vikrams.quotescreator/com.unsplash.pickerandroid.photopicker.presentation.UnsplashPickerActivity}: kotlin.UninitializedPropertyAccessException: lateinit property application has not been initialized

Stacktrace:

com.unsplash.pickerandroid.photopicker.UnsplashPhotoPicker.getApplication (UnsplashPhotoPicker.java:36)
com.unsplash.pickerandroid.photopicker.Injector.createHttpClient (Injector.java:46)
com.unsplash.pickerandroid.photopicker.Injector.createRetrofitBuilder (Injector.java:56)
com.unsplash.pickerandroid.photopicker.Injector.createNetworkEndpoints (Injector.java:61)
com.unsplash.pickerandroid.photopicker.Injector.createRepository (Injector.java:64)
com.unsplash.pickerandroid.photopicker.Injector.createPickerViewModelFactory (Injector.java:68)
com.unsplash.pickerandroid.photopicker.presentation.UnsplashPickerActivity.onCreate (UnsplashPickerActivity.java:66)
android.app.Activity.performCreate (Activity.java:7964)
android.app.Activity.performCreate (Activity.java:7953)
android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1307)
android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3472)
android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3636)

@vikram731 vikram731 added the bug Something isn't working label Aug 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant