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!
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)
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
I been testing the preview of Android P and I'm having some problems with the WifiRttManager used for indoorPositioning. For some reason when I try to use the method startRanging from WifiRttManager but I'm getting this error:
java.lang.NoSuchMethodError: No virtual method startRanging(Landroid/net/wifi/rtt/RangingRequest;Ljava/util/concurrent/Executor;Landroid/net/wifi/rtt/RangingResultCallback;)V in class Landroid/net/wifi/rtt/WifiRttManager; or its super classes (declaration of 'android.net.wifi.rtt.WifiRttManager' appears in /system/framework/framework.jar)
The method displayed by the android studio is the following:
startRanging(RangingRequest rangingRequest, Executor executor, RangingResultCallback callback);
but the documentation https://developer.android.com/reference/android/net/wifi/rtt/WifiRttManager.html has this other one:
startRanging(RangingRequest request, RangingResultCallback callback, Handler handler)
Could you help me to check what's happening please?
I got the same problems.
Updating the Android P to revision 2 using SDK Manager in Android Studio will fix this problem.
java.lang.NoSuchMethodError: No virtual method launchUrl(Landroid/app/Activity;Landroid/net/Uri;)V in class Landroid/support/customtabs/CustomTabsIntent
Before everything worked, but today I can see the above error.
Why it happens? if something was changed, why not backwards-compatible?
Don't know if it helps you but in my case (I have Facebook SDK in my app with custom tabs enabled) this error happened when user (without installed Facebook app) tried to log in.
Exception java.lang.NoSuchMethodError: No virtual method launchUrl(Landroid/app/Activity;Landroid/net/Uri;)V in class Landroid/support/customtabs/CustomTabsIntent; or its super classes
com.facebook.internal.CustomTab.openCustomTab (CustomTab.java:48)
Updating dependency to use latest SDK version (they switched to customtabs:25.0.0 in version 4.17.0)
compile 'com.facebook.android:facebook-android-sdk:4.17.0'
fixed the problem.
I also use Custom Tabs (v25.0.0) in my app and have no issues with them. If it's not your case you can check what they've changed.
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?