I ejected from expo for integrating Expo Payments for both IOS and Android. Getting StripeModule as null.
Steps that i have done for Payments
expo eject
Selected ExpoKit option
expo start
Ran project on android studio without applying any change of gradle versions
As this project’s sdk version was > 30 so there were no changes required for payments integration
imports are like this - import {PaymentsStripe as Stripe} from 'expo-payments-stripe';
initializing Stripe in componentDidMount as below:-
Stripe.setOptionsAsync({
publishableKey: 'sk_test_VTUPYk8pxYap0g8fhpg9qdKF',
androidPayMode: 'test', // Android only
})
Getting warning after this code:-
Exception occurred while executing exported method init on module
StripeModule: null
As the StripeModule is null according to the warning above. whenever i call a function to get token, it is giving NullPointerException
java.lang.NullPointerException: Attempt to invoke virtual method 'void
com.stripe.android.Stripe.createToken(com.stripe.android.model.Card,
java.lang.String, com.stripe.android.TokenCallback)' on a null object
reference
Related
Hi, I am trying to include in my project using react-native-webrtc react native module but I am getting the following error. The main tip is that I got the same error when I used jitsi. Has anyone encountered this problem before? I've never seen a similar anywhere.
1. Application is receiving build success
2. App crashes when runtime
3. Unfortunately I have no more arguments for solving this problem.
E/System: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.content.res.StringBlock.close()' on a null object reference
at android.content.res.ApkAssets.close(ApkAssets.java:201)
at android.content.res.ApkAssets.finalize(ApkAssets.java:191)
at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:289)
at java.lang.Daemons$FinalizerDaemon.runInternal(Daemons.java:276)
at java.lang.Daemons$Daemon.run(Daemons.java:137)
at java.lang.Thread.run(Thread.java:929)
Here's the error details:
12-04 22:00:12.087: E/AndroidRuntime(19113):
java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.package.name.dev/com.package.name.dev.MainActivity}:
java.lang.NullPointerException: Attempt to invoke virtual method 'void
org.apache.cordova.CordovaPlugin.privateInitialize(java.lang.String,
org.apache.cordova.CordovaInterface,
org.apache.cordova.CordovaWebView,
org.apache.cordova.CordovaPreferences)' on a null object reference
Background: I was originally only building the app for Android, but during my last release I had to generate an iOS build as well, which required some extra plugins and configuration tweaks to get functional. Now I'm trying to create a new release for Android, but the new app force closes as soon as it is opened.
In an effort to fix it, I tried to remove all references to the iOS-only plugins from the Android side of the project, but the error persists. I'm not sure what else to try.
What would provoke Cordova to throw this error when initializing plugins?
The issue was that one of the plugins had failed to copy its java classes into the Android app src directory when it was installed. I created the appropriate directory hierarchy and then copied in the java files from the /plugins/ dir.
To figure out which plugin caused the issue, I disabled the onload param from each feature one at a time (in the android.json file in the android platform directory) until the app successfully opened.
I am working on a Xamarin.Forms project. In this app I make use of DisplayAlert and DisplayActionSheet, through a DialogService. (see below)
public async Task ShowMessageBox(
string message,
string title)
{
await Application.Current.MainPage.DisplayAlert(
title,
message,
"OK");
}
Then I installed (just installed... no related code implemented) the Xamarin.Facebook.Android nuget package, version 4.11.0.1 (lastest compatible version with my Xamarin.Forms 2.3.2.127). After that, I got an exception every time I try to use my DialogService:
AlertController.setupView
Java.Lang.NullPointerException: Attempt to invoke virtual method 'android.view.View android.view.View.findViewById(int)' on a null object reference
Does anyone know what is happenning?
Thanks in advance!
I have the following error:
12-03 12:20:08.270 28282-28312/com.topantidevelopers.goloud E/Fabric﹕ Unknown error while loading Crashlytics settings. Crashes will be cached until settings can be retrieved.
java.lang.NullPointerException: Attempt to invoke interface method 'void com.android.okhttp.internal.http.Transport.writeRequestHeaders(com.android.okhttp.Request)' on a null object reference
at com.android.okhttp.internal.http.HttpEngine.readResponse(HttpEngine.java:599)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:379)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:323)
at com.android.okhttp.internal.http.HttpURLConnectionImpl.getHeaderField(HttpURLConnectionImpl.java:152)
at com.android.okhttp.internal.http.DelegatingHttpsURLConnection.getHeaderField(DelegatingHttpsURLConnection.java:190)
at com.android.okhttp.internal.http.HttpsURLConnectionImpl.getHeaderField(HttpsURLConnectionImpl.java:25)
at io.fabric.sdk.android.services.network.HttpRequest.header(HttpRequest.java:1875)
at io.fabric.sdk.android.services.settings.DefaultSettingsSpiCall.invoke(DefaultSettingsSpiCall.java:93)
at io.fabric.sdk.android.services.settings.DefaultSettingsController.loadSettingsData(DefaultSettingsController.java:80)
at io.fabric.sdk.android.services.settings.DefaultSettingsController.loadSettingsData(DefaultSettingsController.java:64)
Also appeared this message at the time of import of libraries:
io-fabric-sdk-android_fabric] Using 1.7 requires compiling with Android 4.4 (KitKat); Currently using API 10
Maybe it's version.
Can someone help me?
I'm trying to add the analytics plugin to my phonegap (2.0) project. I have it working fine in iOS but in Android, I followed the instructions from the following link but it end with this error:
https://groups.google.com/d/msg/phonegap/uqYjTmd4w_E/JbKNgAQbQpUJ
Everytime I try to run the app in the simulator, I got the following error:
Uncaught TypeError: Cannot call method 'start' of undefined at file...
Is someone got the same error?
Thanks