Search Unity

Can't run on android in 2019

Discussion in 'Android' started by skantron, Oct 1, 2019.

  1. skantron

    skantron

    Joined:
    May 5, 2011
    Posts:
    35
    I'm trying to build and run on Unity 2019.2.6f1, for android. I am just running the sample scene and Setting build to Android, and building and running on the phone. I was able to do this on 2018 (the app runs, and I see the sample scene), but on 2019, when the app runs, I get the Unity logo, it sort of flashes a couple times then I get a black screen. I have had issues with with 2019 and the downloadable SDK/NDK saying they are not installed via hub when they are in fact installed, but with 2019.2.6f1 it seems like they are installed properly. Though, the app crashes when run. Any ideas what I am doing wrong?

    Thanks
     
  2. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Please provide device logs via "adb logcat | grep -i unity" (or use findstr on Windows)
     
  3. skantron

    skantron

    Joined:
    May 5, 2011
    Posts:
    35
    Thanks, This is what I see (I'm using Logcat in Analysis Window section) hopefully that is the info you need.

    01/01 00:00:00.000 -1 -1 Info : --------- beginning of main
    01/01 00:00:00.000 -1 -1 Info : --------- beginning of system
    10/01 17:04:27.953 30399 30399 Info Finsky: [2] mic.b(3): IQ: Scheduling install request package_name=com.valvesoftware.android.steam.community, version=5379038, priority=3, reason=auto_update, account_name=[Ud3Xyuu9q8SeyGGuUL4ie83AVFvK5_hksNlkOhzoe7g], type=0, constraints=((REQ_CHARGING, REQ_DEVICE_IDLE, REQ_GEARHEAD_PROJECTION_OFF, NETWORK=UNMETERED, PROVISIONING_STATE=PROVISIONED),)
    10/01 17:04:28.199 30399 30499 Warn Finsky: [2128] mgt.call(14): IQ: Resolved conflict: package=com.valvesoftware.android.steam.community. oldConstraints=[(REQ_CHARGING, REQ_GEARHEAD_PROJECTION_OFF, NETWORK=UNMETERED, PROVISIONING_STATE=PROVISIONED)], newConstraints=[(REQ_CHARGING, REQ_DEVICE_IDLE, REQ_GEARHEAD_PROJECTION_OFF, NETWORK=UNMETERED, PROVISIONING_STATE=PROVISIONED)]
    10/01 17:04:28.428 30399 30499 Info Finsky: [2128] mic.b(40): IQ: Notifying installation update. package=com.valvesoftware.android.steam.community, status=SCHEDULED
    10/01 17:04:29.200 30399 30453 Info Finsky: [2088] xkj.a(39): Package com.valvesoftware.android.steam.community staleness changed from 0 to 1569963869200, available version changed from 0 to 5379038 or in-app update priority changed from 0 to 0.
    10/01 17:04:32.172 1234 1274 Info ActivityTaskManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.DefaultCompany.AndroidBuildTest/com.unity3d.player.UnityPlayerActivity} from uid 2000
    10/01 17:04:32.220 1234 1289 Info ActivityManager: Start proc 30923:com.DefaultCompany.AndroidBuildTest/u0a355 for activity {com.DefaultCompany.AndroidBuildTest/com.unity3d.player.UnityPlayerActivity}
    10/01 17:04:32.793 1234 1287 Info ActivityTaskManager: Displayed com.DefaultCompany.AndroidBuildTest/com.unity3d.player.UnityPlayerActivity: +604ms
    10/01 17:04:42.394 30923 30995 Error mono-rt: c9406000-c941b000 rw-p 00e2c000 08:0d 3146593 /data/app/com.DefaultCompany.AndroidBuildTest-NJsgXAxgtWOwApbgXWShfg==/lib/arm/libunity.so
    01/01 00:00:00.000 -1 -1 Info : read: unexpected EOF!
     
  4. skantron

    skantron

    Joined:
    May 5, 2011
    Posts:
    35
    I uninstalled the Steam App and get this
    01/01 00:00:00.000 -1 -1 Info : --------- beginning of system
    10/01 17:14:34.960 1234 4122 Info ActivityTaskManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.DefaultCompany.AndroidBuildTest/com.unity3d.player.UnityPlayerActivity} from uid 2000
    10/01 17:14:34.995 1234 1289 Info ActivityManager: Start proc 4411:com.DefaultCompany.AndroidBuildTest/u0a355 for activity {com.DefaultCompany.AndroidBuildTest/com.unity3d.player.UnityPlayerActivity}
    01/01 00:00:00.000 -1 -1 Info : --------- beginning of main
    10/01 17:14:51.233 1234 1561 Warn InputDispatcher: channel 'b2e2e92 com.DefaultCompany.AndroidBuildTest/com.unity3d.player.UnityPlayerActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9
    10/01 17:14:51.233 1234 1561 Error InputDispatcher: channel 'b2e2e92 com.DefaultCompany.AndroidBuildTest/com.unity3d.player.UnityPlayerActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
    10/01 17:14:51.235 1234 4145 Info WindowManager: WIN DEATH: Window{b2e2e92 u0 com.DefaultCompany.AndroidBuildTest/com.unity3d.player.UnityPlayerActivity}
    10/01 17:14:51.235 1234 4145 Warn InputDispatcher: Attempted to unregister already unregistered input channel 'b2e2e92 com.DefaultCompany.AndroidBuildTest/com.unity3d.player.UnityPlayerActivity (server)'
    10/01 17:14:51.246 1234 4148 Warn ActivityTaskManager: Force removing ActivityRecord{a16fa96 u0 com.DefaultCompany.AndroidBuildTest/com.unity3d.player.UnityPlayerActivity t101}: app died, no saved state
    10/01 17:14:51.340 4408 4616 Info AiAiReflection: Filtering unlaunchable event com.valvesoftware.android.steam.community/com.valvesoftware.android.steam.community.activity.MainActivity
     
  5. skantron

    skantron

    Joined:
    May 5, 2011
    Posts:
    35
    Where these logs at all helpful?
     
  6. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    The logs don't actually look familiar, how did you capture them? I generally run "adb logcat" from a terminal window, but I understand that there is an Logcat asset available that I haven't yet checked out, is this what you're using? You uninstalled the Steam app on your Android device? What type of phone or tablet is it? I might suggest comparing the logs from a problem app with 2019 and a working app with 2018 and look for any differences.
     
  7. skantron

    skantron

    Joined:
    May 5, 2011
    Posts:
    35
    Yes I am using the Logcat Package in 2019. The device is a Pixel 2XL. The logcat asset isn't on 2018, so I can't really compare. I can do it through ADB, but when I try to use your command string I get :
    'grep' is not recognized as an internal or external command,
    operable program or batch file.'
    I am guessing grep is a linux/mac only command? What would the proper syntax for windows be? (Sorry, I am not super comfortable with ADB on CMD/Terminal, but hopefully can get what you need with some guidance.
     
  8. skantron

    skantron

    Joined:
    May 5, 2011
    Posts:
    35
    I rebooted the phone after uninstalling steam, and now all the references to steam in the log are gone.

    01/01 00:00:00.000 -1 -1 Info : --------- beginning of main
    01/01 00:00:00.000 -1 -1 Info : --------- beginning of system
    10/03 10:05:14.792 1251 2451 Info ActivityTaskManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10300000 cmp=com.DefaultCompany.AndroidBuildTest/com.unity3d.player.UnityPlayerActivity} from uid 2000
    10/03 10:05:14.819 1251 1294 Info ActivityManager: Start proc 18756:com.DefaultCompany.AndroidBuildTest/u0a355 for activity {com.DefaultCompany.AndroidBuildTest/com.unity3d.player.UnityPlayerActivity}
    10/03 10:05:14.958 1251 1292 Info ActivityTaskManager: Displayed com.DefaultCompany.AndroidBuildTest/com.unity3d.player.UnityPlayerActivity: +162ms
    10/03 10:05:15.219 637 637 Error Layer: [Surface(name=AppWindowToken{613bc74 token=Token{8137c47 ActivityRecord{8bdb86 u0 com.DefaultCompany.AndroidBuildTest/com.unity3d.player.UnityPlayerActivity t161}}})/@0xe9107d1 - animation-leash#0] No local sync point found
    10/03 10:05:34.361 1251 1560 Warn InputDispatcher: channel '732642f com.DefaultCompany.AndroidBuildTest/com.unity3d.player.UnityPlayerActivity (server)' ~ Consumer closed input channel or an error occurred. events=0x9
    10/03 10:05:34.361 1251 1560 Error InputDispatcher: channel '732642f com.DefaultCompany.AndroidBuildTest/com.unity3d.player.UnityPlayerActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
    10/03 10:05:34.363 1251 3873 Info WindowManager: WIN DEATH: Window{732642f u0 com.DefaultCompany.AndroidBuildTest/com.unity3d.player.UnityPlayerActivity}
    10/03 10:05:34.363 1251 3873 Warn InputDispatcher: Attempted to unregister already unregistered input channel '732642f com.DefaultCompany.AndroidBuildTest/com.unity3d.player.UnityPlayerActivity (server)'
    10/03 10:05:34.375 1251 2055 Warn ActivityTaskManager: Force removing ActivityRecord{8bdb86 u0 com.DefaultCompany.AndroidBuildTest/com.unity3d.player.UnityPlayerActivity t161}: app died, no saved state
     
  9. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    The syntax for Windows is "adb logcat | findstr -i unity"
     
  10. skantron

    skantron

    Joined:
    May 5, 2011
    Posts:
    35
    Thanks, I thought I had tried just swapping the command names, but it just hanged. I must have made a typo. But in any case, here are the logs from 2018(lwrp) and 2019(lwrp)

    Do you see any clues in there? Thanks again for the help
     
  11. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    Yes, it will "hang" until you launch your app, then the logs will start to scroll by. If you copied what I wrote it wouldn't be a typo. Please provide a screenshot. You're looking for differences when it works, and when it doesn't. You'll need to compare both logs side by side.
     
  12. skantron

    skantron

    Joined:
    May 5, 2011
    Posts:
    35
    Sorry, it may have not been clear, they were both in there.

    Here is the 2019 version (that is not running)
    and here is the 2018 version that is running.
    Both are running the LWRP, and the default sample scene with the Unity construction props.
     
  13. dominykasm

    dominykasm

    Unity Technologies

    Joined:
    May 27, 2018
    Posts:
    70
    @skantron Looks like there's a crash on the last line, could you paste the whole stacktrace?
     
  14. skantron

    skantron

    Joined:
    May 5, 2011
    Posts:
    35
    I would love to, but I may need some guidance on how to do that (and should I do it from ADB logcat, or from the Unity Logcat shell)
     
  15. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
    adb logcat | findstr -i unity > log.txt
     
  16. skantron

    skantron

    Joined:
    May 5, 2011
    Posts:
    35
    So, here's where I got.
     
  17. skantron

    skantron

    Joined:
    May 5, 2011
    Posts:
    35
    Is that at all helpful? I really am not sure what I am looking for in there.
     
  18. skantron

    skantron

    Joined:
    May 5, 2011
    Posts:
    35
    So, I was not able to get this running on 2019.2.6f1, which is disappointing, but I was able to use Unity 2019.2.9f1 to get a basic build running, but only with a standard 3d project, not with a LWRP project.
     
    protopop likes this.