Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Objects gone in android build

Discussion in 'Android' started by Baalhug, Mar 9, 2020.

  1. Baalhug

    Baalhug

    Joined:
    Aug 12, 2013
    Posts:
    32
    Hi:

    I have a problem with my game, it works OK in editor but when in android build in device or emulator all objects are gone, the game works (GUI, music and skybox) but all other objects are gone (not only not visible, they are not there).
    I have it in closed alpha while I'm testing it in android devices. The game worked nice when I first tested it in devices by importing the apk directly (not installing from google play).

    When I started using Google Play Games plugin for Unity (https://github.com/playgameservices/play-games-plugin-for-unity), so I can manage leaderboards, I had some problems with users authentication, and I followed this post https://forum.unity.com/threads/google-play-services-not-working.485322/#post-5550085. Since then, even when exporting to apk and installing directly on device or emulator, the problem happens. I have read a lot and it seems this may be a problem with androidmanifest.xml or permissions but I don´t know what to do now, or how to check it. I don´t know where I can see the logs in android, if there are or I must activate them... I'm a little lost here.

    Any help?
     
  2. mgear

    mgear

    Joined:
    Aug 3, 2010
    Posts:
    9,022
  3. Baalhug

    Baalhug

    Joined:
    Aug 12, 2013
    Posts:
    32
    It seems I'm having no luck at all. First I tried with ADB logcat, but for all that to work I must have my cellphone connected, the problem is my cellphone is quite old, strange, chinese model Elephone p8000, and I can´t get my PC detects it in debug mode (I can access to phone's file system, but nothing else). After that I tried Android Device Monitor, but same problem. Then I looked for a way to debug with an emulator. I installed Android Studio but the emulator won't run since I have an AMD processor and windows 7 64, I need HAXM to run the emulator but my computer/OS is not compatible.
     
  4. Baalhug

    Baalhug

    Joined:
    Aug 12, 2013
    Posts:
    32
    For anyone else having this issue. I finally found a universal USB driver installer here: https://uptodrivers.com/how-to-install-adb-driver-on-windows-7-8-10-x64-64-bit/
    It detected my wrong driver and installed the right one, after that the command adb devices shows my device plugged, and running command: C:\Users\ (...) \AppData\Local\Android\Sdk\platform-tools>adb logcat -s Unity ActivityManager PackageManager dalvikvm DEBUG
    starts debugging de device.
     
  5. Baalhug

    Baalhug

    Joined:
    Aug 12, 2013
    Posts:
    32
    Well,the only problem I see when debugging my game is this:


    E/Unity (20007): AndroidJavaException: java.lang.ClassNotFoundException: com.google.android.gms.games.Games
    E/Unity (20007): java.lang.ClassNotFoundException: com.google.android.gms.games.Games
    E/Unity (20007): at java.lang.Class.classForName(Native Method)
    E/Unity (20007): at java.lang.Class.forName(Class.java:309)
    E/Unity (20007): at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
    E/Unity (20007): at com.unity3d.player.UnityPlayer.c(Unknown Source)
    E/Unity (20007): at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source)
    E/Unity (20007): at android.os.Handler.dispatchMessage(Handler.java:107)
    E/Unity (20007): at android.os.Looper.loop(Looper.java:194)
    E/Unity (20007): at com.unity3d.player.UnityPlayer$e.run(Unknown Source)
    E/Unity (20007): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.games.Games" on path: DexPathList[[zip file "/data/app/com.Baalsoft.Amaze-2/base.apk", zip file "/data/app/com.Baalsoft.Amaze-2/split_config.arm64_v8a.apk"],nativeLibraryDirectories=[/data/app/com.Baalsoft.Amaze-2/lib/arm64, /vendor/lib64, /system/lib64]]
    E/Unity (20007): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
    E/Unity (20007): at java.l
    V/ActivityManager( 831): Broadcast sticky: Intent { act=android.intent.action.SIG_STR flg=0x20000010 (has extras) } ordered=false userid=-1 callerApp=ProcessRecord{225c7a89 831:system/1000}
    W/ActivityManager( 831): Activity pause timeout for ActivityRecord{1817b83d u0com.Baalsoft.Amaze/com.unity3d.player.UnityPlayerActivity t15739 f}
    I/ActivityManager( 831): haltActivityResuming


    So I'll start digginig here.
     
  6. Voxel-Busters

    Voxel-Busters

    Joined:
    Feb 25, 2015
    Posts:
    1,858
    Check if your resolver failed to resolve the google play services libraries. This happens if your apk doesn't have the required libraries resolved.