# How to get error line when debugging APK from Logcat

I made android game by Unity and built APK. When I got error from this game, I can see the error message:

07-06 00:35:38.905: I/Unity(31609): (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
07-06 00:35:38.906: E/Unity(31609): NullReferenceException: Object reference not set to an instance of an object
07-06 00:35:38.906: E/Unity(31609):   at GameManager.OnRealTimeMessageReceived (Boolean isReliable, System.String senderId, System.Byte[] data) [0x00000] in <filename unknown>:0
07-06 00:35:38.906: E/Unity(31609):   at GooglePlayGames.OurUtils.PlayGamesHelperObject.Update () [0x00000] in <filename unknown>:0
07-06 00:35:38.906: E/Unity(31609):
07-06 00:35:38.906: E/Unity(31609): (Filename:  Line: -1)


However file name and error line is wrong, so I can't check where exactly error came from.

I checked my logic almost 2 hours also the object references too, but there is no logic to access undefined object code.

It could be, but I can't see where it is. I must run this app because it uses Google Play Games Service, so it requires completed built APK without developlemt option checked.

Using Application.RegisterLogCallback not much help, it has exactly same result.

How do I get exact error line in this case?

If all else fails, just add a bunch of Debug.Log calls (every other line, if necessary) with simple messages like “a”, “b”, “c”, etc. Look through the logcat to see the last successfully logged message before the error.