App Keeps Stopping on Some Devices (when using Custom WebView)

Hello, I've launched my first app in google play, (thank you MIT AI2 Devs)
My app works perfect on lots of devices but when I open it with some devices(old,cheap devices)
It keeps stopping while starting.
I am suspecting from my extensions which are;

I tested with 6-7 different phones and it crushed only 2 of them. One of them is android 7. I installed "Hello Cudi" tutorial's apk to this phone and it worked. I don't know the other phones android version but I will post here when I learn. From this extensions which one does not support lower android version devices? Any idea?

I searched my problem in forum and there was similar questions but this one is his phones problem, and this has no solving.

I did not share my aia file because it contains too many blocks to investigate and contains my special information for some sites. I can share it via direct message if needed to solve. But as I said I am suspecting from my extensions since my app works on lots of devices, my codes can not be wrong.

Lastly, I tried my app in firebase test lab > Robo test and phone was "Pixel 5e, API Level 30" and it worked fine, it gave only 1 caution which is;

Non-SDK API Usage Violation

Your app uses 1 non-SDK interfaces, which are incompatible with Android P+.


Addition Edit: Just do another test with firebase test and results;

and last text with virtual devices.

Phone: Nexus 5, API level 23

java.lang.NoClassDefFoundError: Failed resolution of: Landroid/view/autofill/AutofillManager;
       FATAL EXCEPTION: main
Process: appinventor.ai_hasanonuratac.AnimeKing, PID: 10679
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/view/autofill/AutofillManager;
	at com.sunny.CustomWebView.CustomWebView.resetWebView(Unknown Source)
	at com.sunny.CustomWebView.CustomWebView.<init>(Unknown Source)
	at java.lang.reflect.Constructor.newInstance(Native Method)
	at gnu.expr.PrimProcedure.apply(
	at gnu.mapping.CallContext.runUntilDone(
	at gnu.mapping.CallContext.runUntilValue(
	at gnu.kawa.reflect.Invoke.applyN(
	at gnu.mapping.ProcedureN.apply2(
	at appinventor.ai_hasanonuratac.AnimeKing.Screen1.$define(Screen1.yail:10257)
	at appinventor.ai_hasanonuratac.AnimeKing.Screen1.onCreate(Screen1.yail:10003)
	at android.os.Handler.dispatchMessage(
	at android.os.Looper.loop(
	at java.lang.reflect.Method.invoke(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.view.autofill.AutofillManager" on path: DexPathList[[zip file "/data/app/appinventor.ai_hasanonuratac.AnimeKing-1/base.apk"],nativeLibraryDirectories=[/data/app/appinventor.ai_hasanonuratac.AnimeKing-1/lib/arm, /vendor/lib, /system/lib]]
	at dalvik.system.BaseDexClassLoader.findClass(
	at java.lang.ClassLoader.loadClass(
	at java.lang.ClassLoader.loadClass(
	... 24 more
	Suppressed: java.lang.ClassNotFoundException: android.view.autofill.AutofillManager
		at java.lang.Class.classForName(Native Method)
		at java.lang.BootClassLoader.findClass(
		at java.lang.BootClassLoader.loadClass(
		at java.lang.ClassLoader.loadClass(
		... 25 more
	Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available

Seems that your project is not working on older phones. Check the extensions used once again. Some extensions do not work on older Android devices like Android 5.

this is exactly what I am saying :slight_smile:
How can I find which extension works in which android version and sdk version?

Review the documentations of these extensions once again. Find their minimum supported APIs. Or, if the documentations didn't include a section for minimum APIs, see the Tests sections for tests that have been conducted with which extensions.


Or backtrack through your app, remove one extension at a time and test to see if it crashes.


Also make sure that you are using latest versions of the extensions


I think the reason is customwebview extension. I created a new app which only contains customwebview and it crushs on old phones. I will download lastest version and going to try again. I'll inform here the results.

1 Like

For latest version 11 required Api is 21 see GitHub - vknow360/CustomWebView: An extended form of WebViewer with more customization and flexibility (For MIT AI2 and its distros)

1 Like

Yes I downloaded aix from here and I am going to try it as soon as possible.
Interesting part is in my app the version I used is 11 which is last version according to creator.
Anyway we'll see the results soon

Did not work. Created an issue on github page.

It is a known issue.
Please use v 12.0beta.

1 Like

Thank you I tried and it works, for other's here is beta link.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.