You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Android 10 and 11, in LinkSheet navigate to Settings > Apps > Preferred apps
On Android 9 and below, simply open LinkSheet
In functions, checks like if (AndroidVersion.AT_LEAST_API_31_S) are performed. However, fields are only annotated with @RequiresApi, which is a hint and does not prevent initialization.
Therefore, domainVerificationManager field in PreferredAppSettingsViewModel causes crash as Android can't find the class of the service:
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/app/role/RoleManager;
(Obfuscated stack trace omitted)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.app.role.RoleManager" on path: DexPathList[[zip file "/data/app/fe.linksheet.nightly-66axovlUfdaoJtmvjdnJCA==/base.apk"],nativeLibraryDirectories=[/data/app/fe.linksheet.nightly-66axovlUfdaoJtmvjdnJCA==/lib/x86_64, /system/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 62 more
There are more fields annotated this way in AppsWhichCanOpenLinksViewModel, but users can't reach that route below Android 12, so there's no impact there.
Version
Nightly
Previous version
0.0.31
Device
Android Emulator
Android version
Android 11
Application log or crash log
No response
Reproducible on latest nightly build
Yes
The text was updated successfully, but these errors were encountered:
Thanks for the very detailed bug report, I thought the Android Gradle plugin does some magic at compile time to transform code using this annotation, but apparently it does not.
Bug description
The app crashes when:
In functions, checks like
if (AndroidVersion.AT_LEAST_API_31_S)
are performed. However, fields are only annotated with@RequiresApi
, which is a hint and does not prevent initialization.Therefore,
domainVerificationManager
field inPreferredAppSettingsViewModel
causes crash as Android can't find the class of the service:Similarly for
roleManager
field inMainViewModel
:There are more fields annotated this way in
AppsWhichCanOpenLinksViewModel
, but users can't reach that route below Android 12, so there's no impact there.Version
Nightly
Previous version
0.0.31
Device
Android Emulator
Android version
Android 11
Application log or crash log
No response
Reproducible on latest nightly build
Yes
The text was updated successfully, but these errors were encountered: