Search code examples
androidunity-game-enginedaydream

Android: Didn't find class "com.google.unity.GoogleUnityActivity"


There are three parts of this issue:

  1. New Unity GoogleVR package appeared so I decided to update it. After deleting old package and importing new one, I got a suggestion to delete 4 files which are using old api.

  2. If I delete them Android app crashes on mobile phone with an error Didn't find class "com.google.unity.GoogleUnityActivity". Note: one of the files it suggested to delete was /Assets/Plugins/Android/unitygvractivity.aar which I assume has some significants.

  3. If I don't delete it, Unity can't build the package: "unable to convert classes into dex format"

My question: how to include GoogleUnityActivity class so Unity doesn't complain. And why would Unity delete this class?

I'm using:

  • Unity3D 5.4.1f1-GVR7
  • Latest GoogleVR package (Sep 23rd)
  • JDK: jdk1.8.0_102
  • SDK: 24

Solution

  • I found the cause!

    After I updated GoogleVR asset folder, I forgot there's another one called Plugins. That folder contains manifest.xml files which defines which class to use. After completely reimporting the asset, problem solved it self!