C++ Exception in 'nativeRequireModuleConfig', What is Landroid? - android

C++ Exception in 'nativeRequireModuleConfig':
java.lang.NoSuchMethodError: No static method getNoBackupFilesDir(Landroid/content/Context;)Ljava/io/File; in class Lcom/google/android/gms/common/util/zzx; or its super classes (decleration of 'com.google.android.gms.common.util.zzx' appears in /data/app/com.kotac-2/base.apk)

To avoid this error you can modify the project into a working state, for example if your project is on git and versioned, reset it into an older commit which it is working well.
I was able to get over this issue by getting the app working however and updating the code again.

Related

Android Webview Chromium UnitTests fail with java.lang.NoSuchMethodError

We are currently facing this NoSuchMethod Error when we want to create the unit test with Robolectric version 4.3.1 and Mockito version 2.18.3
Exceptions:
java.lang.NoSuchMethodError: 'void com.android.webview.chromium.WebViewChromium.<init>(com.android.webview.chromium.WebViewChromiumFactoryProvider, android.webkit.WebView, android.webkit.WebView$PrivateAccess, boolean)'
Here is the code we did:
mWebView = Mockito.spy(
new WebviewChromium(
mockWebViewChromiumProvider, webView, webView.new PrivateAccess(), false));
In BUILD.gn, we have included the "//android_webview/glue:glue_java" as dependency, we can successfully compile the code but it sounds like in the runtime, it refers to the another wrong jar, does someone know how to config the build file to use the correct jar or any ideas about how to solve this error?
did you check this followjng thread https://github.com/robolectric/robolectric/issues/5092 and this one I think you need open jdk 11 or 13 I recently had the same issue after adding open jdk 13 to android studio it solved my problem robolectric started working fine you can check following thread as well https://github.com/robolectric/robolectric/issues/5092

How to Solve "The "XamlCTask" task failed unexpectedly" error without updating xamarin.forms version

I am stuck in one of my issue in xamarin.forms. In my xamarin.form project xamarin.form package version is 2.3.2.123 in PCL,Android and IOS.
Since Last few days when I am trying to build my iphone project, its gives me an error
The "XamlCTask" task failed unexpectedly
So I have updated xamarin.form version in PCL, Droid and IOS.
but due to this I am facing issue in Android in one of my page
{Java.Lang.NullPointerException: Attempt to invoke virtual method
'boolean android.graphics.Bitmap.isMutable()' on a null object
reference at
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw ()
[0x0000c] in <3fd174ff54b146228c505f23cf75ce71>:0 …}
I am using
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsApplicationActivity
Instead
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
because I want to scroll page even when keyboard is open. If keyboard is open then page can't be scroll in android this is the bug of "App Compact".
Now I don't understand what should I do?
Is there any other way to solve "The "XamlCTask" task failed unexpectedly" error without updating xamarin.forms version.
because all the issues arise due to xamarin.forms updation.
In one of other project I am using same xamarin.forms version but it works perfectly. What is actual reason of "XamlC task failed" error?
Although the cause seems different, it looks like it's a known bug. Maybe you could verify that upgrading to the version mentioned in the bug (2.3.5-pre) works for you, and then either disable XAML compilation for the time being, or work with the Xamarin pre-release packages.

com.android.support:customtabs: No virtual method launchUrl

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.

Lambda method reference to Function<F,T> throws NoClassDefFoundError

I am using Retrolambda for Android with Java 8 and I ran into a runtime fatal exception when saving a lambda method reference into Android's Function<F,T> interface throwing a java.lang.NoClassDefFoundError.
After wasting some time checking my own code, I actually realized that this interface is using javax.annotation.Nullable which has been moved to another dependency, causing it to not display any compilation errors, but throwing the mentioned exception at runtime.
My solution was just to create my own copy of the Function interface with the right Nullable import.

Adding a breakpoint in Eclipse, causes Dalvik to crash

This is an interesting bug of Eclipse. I am using:
Version: Indigo Release
Build id: 20110615-0604
Out of nowhere today, I set a breakpoint in my android app on Eclipse. When it reaches the code, debug (dalvik JVM) aborts and crashes:
Tried to execute code in unprepared class (followed by the class name)
If I don't set the break point, it will run through with no problem. I have searched through Google but found nothing so far.
Another note, where I set this breakpoint does not matter, it could simply be the 1st line of onClick() function, or anywhere else. The moment the app "pauses" due to the breakpoint, it crashes.
I run into the same issue; for me, the problem was solved by removing all of the watched expressions I had set up in the debugger (one of them was causing the problem).
I run into the same issue when used watch expression with static method of this (unprepared) class.
I solved this issue by removing this expression from expressions list.
I solved this issue by removing an unused import package.
actually the error message is saying "tried to execute code in unprepared class" (followed by the class name)
I am not using that class but it is imported.
Simply remove the import, and it works fine ....

Categories

Resources