简体   繁体   中英

Unity Android Debugging Tips

Today I finally managed to build my first android application in Unity. It works nice in the editor but it doesn't work on some real android devices so I used adb logcat to try to find the root of the problem. Here is the log: http://pastebin.com/uHAE3BTb .

I'm rather noobish in Unity, don't really know android java specific functions, I'm quite fond of debugging and I don't know where to start so I need your help for this one.

How do I find where my app fails from adb logcat? Is it possible or should I start commenting lines of code, rebuild and see if it fails every time? Is there another way of doing this?

You just have to be smart about reading the logs. This (I'm sure you know this already though) is the problem:

E/AndroidRuntime( 4994): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.Vali.Atomic/com.unity3d.player.UnityPlayerNativeActivity}: java.lang.IllegalArgumentException: Unable to find native library: main

Looks to me like Unity is not building it's jar file correctly for you. Ensure the android sdk is installed correctly and properly setup within Unity. Also, ensure that the 32 bit version of JDK is also installed and is being used by Unity when compiling

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM