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

Fix Kotlin NPE #71

Merged
merged 2 commits into from
Oct 29, 2022
Merged

Fix Kotlin NPE #71

merged 2 commits into from
Oct 29, 2022

Conversation

anggrayudi
Copy link
Contributor

It crashed on Android with the following error:

E/IBG-Crash: CrashReporting InstabugUncaughtExceptionHandler Caught an Unhandled Exception: java.lang.NullPointerException
    java.lang.NullPointerException
        at co.quis.flutter_contacts.FlutterContactsPlugin$onRequestPermissionsResult$2.invokeSuspend(FlutterContactsPlugin.kt:162)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
        at android.os.Handler.handleCallback(Handler.java:938)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loopOnce(Looper.java:201)
        at android.os.Looper.loop(Looper.java:288)
        at android.app.ActivityThread.main(ActivityThread.java:7842)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)

To fix it, I added null safe call ?.

I also upgraded SDK to 31 to support the latest changes.

@joachim-quis joachim-quis merged commit 10497a1 into QuisApp:master Oct 29, 2022
@joachim-quis
Copy link
Contributor

Thanks @anggrayudi ! Added to 1.1.5+1.

@Ajayparmar014
Copy link

Ajayparmar014 commented Jan 23, 2023

i faced this below error please solve it

The following dependencies do not satisfy the required version:
project ':flutter_contacts' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.0

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

BUILD FAILED in 7s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

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

Successfully merging this pull request may close these issues.

3 participants