We have had an app on the play store for a short amount of time, but none of our developers use Samsung devices, so we haven't been able to test on them. We shared with some Samsung users today, and when they install the app, it crashes immediately without opening. I have received several crash reports through Crashlytics about this, but after investigating, I can't find a solution. The solutions I've found all point out that the class name needs to be capitalized properly, but ours already is.
Here is an overview of the crash logs:
Exception java.lang.RuntimeException: Unable to start activity
ComponentInfo {com.zonderstudios.zonder/com.zonderstudios.zonder.MainActivity}:
android.content.res.Resources$NotFoundException: Drawable
com.zonderstudios.zonder:layout/launch_screen with resource ID
#0x7f04002d
Caused by android.content.res.Resources$NotFoundException: Drawable
com.zonderstudios.zonder:layout/launch_screen with resource ID #0x7f04002d
Caused by android.content.res.Resources$NotFoundException: File
res/layout/launch_screen.xml from drawable resource ID #0x7f04002d
Caused by android.view.InflateException: Class not found LinearLayout
Caused by java.lang.ClassNotFoundException: Didn't find class
"LinearLayout" on path: DexPathList[[zip file
"/data/app/com.zonderstudios.zonder-
R0tFS_4BNjS6q0znS27jPw==/base.apk"],nativeLibraryDirectories= .
[/data/app/com.zonderstudios.zonder-R0tFS_4BNjS6q0znS27jPw==/lib/arm,
/data/app/com.zonderstudios.zonder-
R0tFS_4BNjS6q0znS27jPw==/base.apk!/lib/armeabi-v7a, /system/lib,
/system/vendor/lib]]
Essentially: Didn't find class "LinearLayout" on path: DexPathList for the launch screen.
The splash screen works fine on all of our emulators and other physical devices we've tested with so far. But this issue shows up on the Galaxy S6, S8, and S8+ so far.
Here is the launch_screen.xml
file. @drawable/launch_screen refers to the png image we use as the splash screen.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/launch_image_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:src="@drawable/launch_screen"
/>
</LinearLayout>
We show the launch screen by having the initial theme of the application be set to AppTheme.Launcher
, which is defined like so:
styles.xml
:
<resources xmlns:tools="http://schemas.android.com/tools">
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:windowLightStatusBar" tools:targetApi="23">false</item>
<!-- Customize your theme here. -->
</style>
<style name="AppTheme.Launcher">
<item name="android:windowBackground">@layout/launch_screen</item>
<item name="android:windowLightStatusBar" tools:targetApi="23">true</item>
</style>
</resources>
Does anyone know what causes this issue, or why a particular built-in class wouldn't be found on just one sort of device?