pikaju / flutter-braintree

Flutter plugin that wraps the native Braintree SDKs. Enables payments with credit cards, PayPal, Google Pay and more.
https://pub.dev/packages/flutter_braintree
MIT License
64 stars 126 forks source link

Unable to start activity ComponentInfo{$applicationId/com.braintreepayments.api.DropInActivity} #151

Open santhoshvgts opened 7 months ago

santhoshvgts commented 7 months ago

App Crashed

E/AndroidRuntime(23968): Process: , PID: 23968 E/AndroidRuntime(23968): java.lang.RuntimeException: Unable to start activity ComponentInfo{$applicationId/com.braintreepayments.api.DropInActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.os.Bundle.setClassLoader(java.lang.ClassLoader)' on a null object reference E/AndroidRuntime(23968): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3645) E/AndroidRuntime(23968): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3782) E/AndroidRuntime(23968): at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:101) E/AndroidRuntime(23968): at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) E/AndroidRuntime(23968): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) E/AndroidRuntime(23968): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2307) E/AndroidRuntime(23968): at android.os.Handler.dispatchMessage(Handler.java:106) E/AndroidRuntime(23968): at android.os.Looper.loopOnce(Looper.java:201) E/AndroidRuntime(23968): at android.os.Looper.loop(Looper.java:288) E/AndroidRuntime(23968): at android.app.ActivityThread.main(ActivityThread.java:7872) E/AndroidRuntime(23968): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(23968): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) E/AndroidRuntime(23968): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936) E/AndroidRuntime(23968): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.os.Bundle.setClassLoader(java.lang.ClassLoader)' on a null object reference E/AndroidRuntime(23968): at com.braintreepayments.api.DropInActivity.getDropInRequest(DropInActivity.java:124) E/AndroidRuntime(23968): at com.braintreepayments.api.DropInActivity.onCreate(DropInActivity.java:78) E/AndroidRuntime(23968): at android.app.Activity.performCreate(Activity.java:8305) E/AndroidRuntime(23968): at android.app.Activity.performCreate(Activity.java:8284) E/AndroidRuntime(23968): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1417) E/AndroidRuntime(23968): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3626) E/AndroidRuntime(23968): ... 12 more

Manifest File

    <activity android:name="com.braintreepayments.api.DropInActivity"
        android:launchMode="singleTask">
        <intent-filter>
            <action android:name="android.intent.action.VIEW" />
            <category android:name="android.intent.category.DEFAULT" />
            <category android:name="android.intent.category.BROWSABLE" />
            <data android:scheme="${applicationId}.braintree" />
        </intent-filter>
    </activity>

    <activity android:name="com.example.flutter_braintree.FlutterBraintreeCustom" android:theme="@style/Theme.AppCompat.Light" android:exported="true">
    </activity>
BunnyBuddy commented 7 months ago

Please share the code where you think this is happening or how you've handled it

desxz commented 1 month ago

Same issue, did you find the solution @santhoshvgts ?

lethanhdanh1994 commented 1 month ago

Same issue, Have you found a solution yet?

DinhKhai0201 commented 1 month ago

Same problem.

Minhalatgit commented 3 weeks ago

Same problem is occuring

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.app.pets.vet.app/com.braintreepayments.api.DropInActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.os.Bundle.setClassLoader(java.lang.ClassLoader)' on a null object reference E/AndroidRuntime(29547): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4035) E/AndroidRuntime(29547): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:4201) E/AndroidRuntime(29547): at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:103) E/AndroidRuntime(29547): at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) E/AndroidRuntime(29547): at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) E/AndroidRuntime(29547): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2438) E/AndroidRuntime(29547): at android.os.Handler.dispatchMessage(Handler.java:106) E/AndroidRuntime(29547): at android.os.Looper.loopOnce(Looper.java:226) E/AndroidRuntime(29547): at android.os.Looper.loop(Looper.java:313) E/AndroidRuntime(29547): at android.app.ActivityThread.main(ActivityThread.java:8663) E/AndroidRuntime(29547): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(29547): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:571) E/AndroidRuntime(29547): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1135) E/AndroidRuntime(29547): Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.os.Bundle.setClassLoader(java.lang.ClassLoader)' on a null object reference E/AndroidRuntime(29547): at com.braintreepayments.api.DropInActivity.getDropInRequest(DropInActivity.java:124) E/AndroidRuntime(29547): at com.braintreepayments.api.DropInActivity.onCreate(DropInActivity.java:78) E/AndroidRuntime(29547): at android.app.Activity.performCreate(Activity.java:8290) E/AndroidRuntime(29547): at android.app.Activity.performCreate(Activity.java:8270) E/AndroidRuntime(29547): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1329) E/AndroidRuntime(29547): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:4009) E/AndroidRuntime(29547): ... 12 more