Skip to content

NullPointer when library ties to getCustomView #49

Open
@FoamStudio

Description

@FoamStudio

I've been trying to implement this wonderful library but to no avail. I kept getting the below error log or sometimes get VideoCaptureConfig$Builder not found.

PS: I notice whenever I call InsGallery.openGallery() it open's up an activity which auto rotate to Landscape mode.

My gradle setup

`
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'

implementation "com.github.bumptech.glide:glide:4.12.0"
implementation "androidx.camera:camera-camera2:1.0.0"
implementation 'me.jessyan:insgallery:0.7.0'

`

LOGs

2021-07-11 22:46:19.263 18269-18269/com.vrytin.myapplication E/AndroidRuntime: FATAL EXCEPTION: main Process: com.vrytin.myapplication, PID: 18269 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.vrytin.myapplication/com.luck.picture.lib.instagram.PictureSelectorInstagramStyleActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int com.luck.picture.lib.instagram.InstagramSelectionConfig.getCurrentTheme()' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3449) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:223) at android.app.ActivityThread.main(ActivityThread.java:7656) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int com.luck.picture.lib.instagram.InstagramSelectionConfig.getCurrentTheme()' on a null object reference at com.luck.picture.lib.instagram.InstagramPreviewContainer.<init>(InstagramPreviewContainer.java:116) at com.luck.picture.lib.instagram.PictureSelectorInstagramStyleActivity.initWidgets(PictureSelectorInstagramStyleActivity.java:204) at com.luck.picture.lib.PictureBaseActivity.onCreate(PictureBaseActivity.java:182) at com.luck.picture.lib.instagram.PictureSelectorInstagramStyleActivity.onCreate(PictureSelectorInstagramStyleActivity.java:124) at android.app.Activity.performCreate(Activity.java:8000) at android.app.Activity.performCreate(Activity.java:7984) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3422)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions