unity freeze and crash when change scene. Any idea? - android

When I try to change the scene it freezes, then crashes. But after a while I tried again to open the app, and it worked. Any idea why?
I've already unchecked split application binary. I also tried to open an empty scene and it worked perfectly fine. Could it have anything to do with my object in the scene?
This happens only on Android, it worked well in unity editor.

There can be many reasons. Without code or project settings we can only guess what caused crash. When debugging on Android, it is good to use logcat from which you can read what caused the crash.
How to add logcat to project:
In Unity editor: Window - Package Manager - Android Logcat - Install
Build and run your project
You will find what caused the crash in logs
This way you can identify most errors and not just this specific one.

Related

IDE Fatal Error: Write access is allowed from write-safe contexts only

I have built simple Hello World application and ran it from IntelliJ on my Android device. When application starts, IDE error occur:
Write access is allowed from write-safe contexts only. Please ensure you're using invokeLater/invokeAndWait with a correct modality state (not "any"). See TransactionGuard documentation for details.
In the following window:
Simultaneously, application runs ok.
What is the reason and how to get rid of this message?
Got this same error after upgrading from a 2015 edition of IntelliJ to 2016.3.3.
After restarting the IDE, I took the suggested popup's guidance to upgrade Gradle, which then resynced and this error went away.
My project runs now and doesn't produce this error anymore.
If you are in a similar situation, I can recommend the above, as it removed this exact error in my setup.

Android studio not executing latest code

I have done some modifications to my code which upon running, Android studio behaves exactly the way it was before my changes.
As I place debug points on those new lines, I get a weird error message stating "No executable code found at line xx"
Following is a snapshot of the same. How do I resolve this issue ?
Edit: I have already tried Invalidate caches and restart, still stands unresolved.
I faced the same problem. It possible caused by AndroidStudio's new feature Instant Run. Try to stop current app, hit build->rebuild project then run app again.

Android eclipse run program causes Installation error: 0

I have an Android application. In the latest version I've moved some code from it into separate Android Library projects (two). One library depends on another and project depends on both libraries. So, as I understand, one library includes into final application "twice" (or something similar to twice).
On the first launch of application I receive following in Console (I am using Eclipse):
Installation error: 0
Please check logcat output for more details.
Launch canceled!
Can anybody help?
Thanks!
EDIT
On the second launch program starts normally.
EDIT
I tried to reproduce error on the emulator and other device, it didn't reproduce! Can a problem be on my device? May be on file not deleted or something else?
I've reinstalled Android on my phone and problem solved :) Not a good solution, but works.

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

Setting up Android Bootstrap in IntelliJ

I found this open source project: Android Boostrap. However, I am having some troubles with getting it run in IntelliJ. I have followed their own instructions, but still I am running into some problems. Note that I just started using IntelliJ. I cannot even describe the errors I am getting very precisely, since I am not sure about what exactly is causing them. Here is the screenshot of what I have:
Navigating to the problem:
How do you suggest me to solve it?
Another snapshot regarding unsupported import:

Categories

Resources