GeekyGal
GeekyGal

Reputation: 11

Inmobi Unity SDK is crashing

I am facing an issue with the Inmobi unity package with GDPR 811.

The app that I have built using the above package crashes when I try to open it. So I tried running the stack traces on the Android profiler and found that it is not able to find some UnityPlayerPro xyActivity Class. I have tried removing this class from the Android manifest but it gives build errors.

I used Unity 2019.2.0f1 version with the player settings for the Android platform as; Build Version equal to 0.1 and minimum API level as 16

I have attached a detailed bug report, which can give you more information.

Please help me out in this regard. I would greatly appreciate your assistance in this matter.

  1. Bug Name: Application crashed on opening the app.
  2. Area Path: click
  3. Unity Version: Unity 2019.2.0f1
  4. Build Version: 0.1
  5. Minimum API Level
  6. Android: 16
  7. Environment: Android phone (Samsung Galaxy A10)
  8. Description: Application crash on taping on the game Icon while opening it

Steps To Reproduce:

  1. Import the Inmobi unity package with GDPR 811 into an empty project.
  2. Add the InmobiAdsDemoUnity scene in the Build settings.
  3. Build and run to the Android device.
  4. Install the apk on the device.
  5. Open the apk by tapping on it.

Main Errors caught in the stack traces.

10-30 16:24:52.769: E/AndroidRuntime(7118): java.lang.RuntimeException: Unable to instantiate activity
ComponentInfo{com.SleepyBoar.AdsDemoUnity/com.unity3d.player.UnityPlayerPro
xyActivity}: java.lang.ClassNotFoundException: Didn't find class
"com.unity3d.player.UnityPlayerProxyActivity" on path: DexPathList[[zip file
"/data/app/com.SleepyBoar.AdsDemoUnity-
USpZf9YlQynoJUyJE_N1Kg==/base.apk"],nativeLibraryDirectories=[/data/app/com.
SleepyBoar.AdsDemoUnity-USpZf9YlQynoJUyJE_N1Kg==/lib/arm,
/data/app/com.SleepyBoar.AdsDemoUnity-
USpZf9YlQynoJUyJE_N1Kg==/base.apk!/l`enter code here`ib/armeabi-v7a, /system/lib]]

Upvotes: 1

Views: 325

Answers (1)

Raj Suvariya
Raj Suvariya

Reputation: 1664

The exception that you are getting is due to the main unity player activity name changes in the latest versions of Unity (from 2018).

To resolve this, you would need to find the AndroidManifest.xml file in your Unity Project and replace the activity name from com.unity3d.player.UnityPlayerProxyActivity to com.unity3d.player.UnityPlayerActivity

From

<activity 
    android:name="com.unity3d.player.UnityPlayerProxyActivity"
    android:launchMode="singleTask" 
    android:label="@string/app_name">

to

<activity 
    android:name="com.unity3d.player.UnityPlayerActivity" // changes in this line
    android:launchMode="singleTask" 
    android:label="@string/app_name">

After this, you should be able to run it successfully.

Upvotes: 2

Related Questions