[BUG REPORT] Android Custom Launch Screen obb Crash

Steps to cause crash only affects Samsung devices
Create new blank project(code based)
Add a png to Launch Screen Splash in android settings
Package for Android ETC1(uncheck package game data in apk)
Install and launch causes crash before launch screen appears

Logcat: AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.YourCompany.MyProject/com.YourCompany.MyProjecti.DownloaderActivity}: android.view.InflateException: Binary XML file line #92: Binary XML file line #92: Error inflating class android.widget.Button

Hey -

In order to better assist you, I’m going to need for you to provide me the logs from your mobile device.

  • Attach your phone to the computer
  • Go here: C:\NVPACK\android-sdk-windows\tools
  • Open up Monitor.bat
  • Launch the program and save the logs

If you cannot get Monitor.bat to open, please go to:

  • C:\NVPACK\android-sdk-windows\tools\lib\monitor-x86
  • Open up Monitor.exe
  • Follow the instructions above

Make sure that you highlight all of the logs, because they do not save unless they’re highlighted.

Thank you!

Hey -

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will follow up.

Cheers

I’ve had this issue before and it turned out to be a problem with running on Android 5.x.x on Engine versions greater than 4.12. It is fixable I believe. Apparantly android 5.x.x doesn’t like RelativeLayouts with the android:background element.

So instead of this in \Engine\Build\Android\Java\res\layout-land\donwloader_progress.xml

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal" 
    android:background="@drawable/downloadimageh"
	>

remove the android:background element and add an ImageView just below it so you have this:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal" 
	>

	<ImageView  
            android:layout_width="match_parent"
            android:layout_height="match_parent"
			android:fitsSystemWindows="true"
            android:src="@drawable/downloadimageh"/>

You will have to do that in all downloader_progress.xml files for the orientations you are using in layout, layout-land and layout-port.

However at this stage, android 5 is too old for us to bother with so we just dropped support for it.

Thanks,