Error causes it not to start on Android, tested on several devices
Hello, excellent app, little by little I have been doing several things as practice in a personal project.
It happens that of the examples shown in AvaloniaInside.Shell, the ShellBottomCustomNavigator example does not start and does not show an error either. On the contrary, the ShellExample does start without incident. Another thing is that initially ShellBottomCustomNavigator didn't even work on Desktop, I had to update some libraries, since they have the static Avalonia version. I also think the .net version was different than ShellExample.
This is the error when the app is closed
These are some of the changes I made so that it would compile without an incompatibility error with the Shell library.
In AndroidManifest, MainActivity and SplashActivity I don't have any changes added, everything is as it was downloaded
I created a new app in which I have models, sqlite, connection to an API, etc. It works fine on desktop, but on mobile the same thing happens to ShellBottomCustomNavigator, I have not been able to find the error, since there is no obvious error in the terminal, the app just closes when trying to start
I tested this by installing the app both debug and release on 3 different Android devices and the same thing happened on all of them, reviewing the code I did not find an obvious difference with ShellExample
Hello @Yusuke1998
So what I understood, the ShellExample works without any error and problem and ShellBottomCustomNavigator crash.
@lukewire129 Any idea about this problem?
By the way. What can you find in the logcat?
@OmidID hi, logcat:
2024-05-31 15:36:00.605 0-0 audit kernel E rate limit exceeded
2024-05-31 15:36:01.641 0-0 audit kernel E rate limit exceeded
2024-05-31 15:36:02.731 0-0 audit kernel E rate limit exceeded
2024-05-31 15:36:04.204 0-0 audit kernel E rate limit exceeded
2024-05-31 15:36:05.257 0-0 audit kernel E rate limit exceeded
2024-05-31 15:36:06.322 0-0 audit kernel E rate limit exceeded
2024-05-31 15:36:07.336 0-0 audit kernel E rate limit exceeded
2024-05-31 15:36:08.355 0-0 audit kernel E rate limit exceeded
2024-05-31 15:36:09.402 0-0 audit kernel E rate limit exceeded
2024-05-31 15:36:10.469 0-0 audit kernel E rate limit exceeded
2024-05-31 15:36:11.498 0-0 audit kernel E rate limit exceeded
2024-05-31 15:36:12.538 0-0 audit kernel E rate limit exceeded
2024-05-31 15:36:13.595 0-0 audit kernel E rate limit exceeded
2024-05-31 15:36:14.893 0-0 audit kernel E rate limit exceeded
2024-05-31 15:36:15.914 0-0 audit kernel E rate limit exceeded
2024-05-31 15:36:16.925 0-0 audit kernel E rate limit exceeded
2024-05-31 15:36:17.964 0-0 audit kernel E rate limit exceeded
2024-05-31 15:36:23.632 619-3870 TaskPersister pid-619 E File error accessing recents directory (directory
doesn't exist?).
2024-05-31 15:36:24.441 15809-15809 AndroidRuntime com...me.ShellBottomCustomNavigator E FATAL EXCEPTION: main
Process: com.CompanyName.ShellBottomCustomNavigator, PID: 15809
java.lang.UnsatisfiedLinkError: dlopen
failed: unsupported DT_REL in
"/data/app/~~-cxNhHdRFqoBX-HbXEjPIQ==/com.CompanyName.ShellBottomCustomNavigator-tPqeJAh2lWX0jCPgXbY7Cg==/lib/x86_64/libxamarin-debug-app-helper.so"
at java.lang.Runtime.loadLibrary0(Runtime.java:1081)
at java.lang.Runtime.loadLibrary0(Runtime.java:1003)
at java.lang.System.loadLibrary(System.java:1765)
at
mono.MonoPackageManager.LoadApplication(MonoPackageManager.java:97)
at
mono.MonoRuntimeProvider.attachInfo(MonoRuntimeProvider.java:35)
at
android.app.ActivityThread.installProvider(ActivityThread.java:8261)
at
android.app.ActivityThread.installContentProviders(ActivityThread.java:7776)
at
android.app.ActivityThread.handleBindApplication(ActivityThread.java:7465)
at
android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown
Source:0)
at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:2399)
at
android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at
android.app.ActivityThread.main(ActivityThread.java:8674)
at java.lang.reflect.Method.invoke(Native Method)
at
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:886)
2024-05-31 15:36:26.243 437-437 SurfaceFlinger pid-437 E Out of order buffers detected for
RequestedLayerState{com.google.android.apps.nexuslauncher/com.google.android.apps.nexuslauncher.NexusLauncherActivity#770
parentId=105} producedId=30 frameNumber=277
-> producedId=30 frameNumber=2
2024-05-31 15:36:26.680 437-437 SurfaceFlinger pid-437 E Out of order buffers detected for
RequestedLayerState{com.google.android.apps.nexuslauncher/com.google.android.apps.nexuslauncher.NexusLauncherActivity#770
parentId=105} producedId=30 frameNumber=277
-> producedId=30 frameNumber=3
2024-05-31 15:36:26.741 437-437 SurfaceFlinger pid-437 E Out of order buffers detected for
RequestedLayerState{com.google.android.apps.nexuslauncher/com.google.android.apps.nexuslauncher.NexusLauncherActivity#770
parentId=105} producedId=30 frameNumber=277
-> producedId=30 frameNumber=4
2024-05-31 15:36:26.953 437-437 SurfaceFlinger pid-437 E Out of order buffers detected for
RequestedLayerState{com.google.android.apps.nexuslauncher/com.google.android.apps.nexuslauncher.NexusLauncherActivity#770
parentId=105} producedId=30 frameNumber=277
-> producedId=30 frameNumber=5
2024-05-31 15:36:27.056 437-437 SurfaceFlinger pid-437 E Out of order buffers detected for
RequestedLayerState{com.google.android.apps.nexuslauncher/com.google.android.apps.nexuslauncher.NexusLauncherActivity#770
parentId=105} producedId=30 frameNumber=277
-> producedId=30 frameNumber=6
2024-05-31 15:36:29.126 0-0 DEBUG 16K kernel E [814]: madvise: start addr (0x72e268e1b000) is not
aligned
2024-05-31 15:36:29.157 0-0 DEBUG 16K kernel E [814]: madvise: start addr (0x72e5ae736000) is not
aligned
2024-05-31 15:36:29.166 0-0 DEBUG 16K kernel E [814]: madvise: start addr (0x72e5ae73a000) is not
aligned
2024-05-31 15:36:29.174 0-0 DEBUG 16K kernel E [814]: madvise: start addr (0x72e5ae751000) is not
aligned
2024-05-31 15:36:29.186 0-0 DEBUG 16K kernel E [814]: madvise: start addr (0x72e5ae755000) is not
aligned
2024-05-31 15:36:29.202 0-0 DEBUG 16K kernel E [814]: madvise: start addr (0x72e5ae8f1000) is not
aligned
2024-05-31 15:36:29.227 0-0 DEBUG 16K kernel E [814]: madvise: start addr (0x72e5ae8f9000) is not
aligned
2024-05-31 15:36:29.764 619-3870 TaskPersister pid-619 E File error accessing recents directory (directory
doesn't exist?).
Hello @Yusuke1998 For me this is linker issue. I imagine you are in release mode. How about if you run it using Visual Studio? If you have issue with release, You need to setup your Linker config file and also r8 file to ignore some references.
I only tested in a Windows environment, which is easier to debug, so I didn't check the other OS parts like crazy. I apologize for the inconvenience.
Sorry,
I am currently unable to edit due to personal commitments. I'll check it out and post it again.
@Yusuke1998 Do you still need help or can we close the issue?