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+.

Landroid/media/AudioManager;->getOutputLatency(I)I

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


and last text with virtual devices.

Phone: Nexus 5, API level 23
Error:

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(PrimProcedure.java:272)
	at gnu.mapping.CallContext.runUntilDone(CallContext.java:234)
	at gnu.mapping.CallContext.runUntilValue(CallContext.java:298)
	at gnu.kawa.reflect.Invoke.applyN(Invoke.java:209)
	at gnu.mapping.ProcedureN.apply2(ProcedureN.java:39)
	at appinventor.ai_hasanonuratac.AnimeKing.Screen1.$define(Screen1.yail:10257)
	at com.google.appinventor.components.runtime.Form.onCreateFinish(Form.java:395)
	at com.google.appinventor.components.runtime.Form.onCreate(Form.java:340)
	at appinventor.ai_hasanonuratac.AnimeKing.Screen1.onCreate(Screen1.yail:10003)
	at android.app.Activity.performCreate(Activity.java:6251)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
	at android.app.ActivityThread.-wrap11(ActivityThread.java)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
	at android.os.Handler.dispatchMessage(Handler.java:102)
	at android.os.Looper.loop(Looper.java:148)
	at android.app.ActivityThread.main(ActivityThread.java:5417)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
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(BaseDexClassLoader.java:56)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
	... 24 more
	Suppressed: java.lang.ClassNotFoundException: android.view.autofill.AutofillManager
		at java.lang.Class.classForName(Native Method)
		at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
		at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
		at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
		... 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.

2 Likes

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

2 Likes

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

2 Likes

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.