Unity Android KitKat application stopped issue - android

I'm trying to get Unity3d project working on Android KitKat device. I installed APK on device and during launching got error:
application stopped
Than I figured out that problem not in my project's code but in starting Activity which is generated by Unity. I've caught following exception:
Unable to start activity
ComponentInfo{com.getFire.plugin/com.unity3d.player.UnityPlayerNativeActivity}:
java.lang.NullPointerExсeption
To confirm that, I've created empty project from a scratch - but the error still occurs.
Here is screenshot of Unity empty project:
Enviroment:
Unity3d 3.5.7 Nexus 5 4.4.2
It also can be reproduced on KitKat emulator.
Note: It works fine for all other devices < Android 4.4
Any help very appreciated.

Are you using the ART runtime? Unity3D does not work with ART yet, here are two links about that.
Feedback posted in Unity3D to ask for support for ART here: http://feedback.unity3d.com/suggestions/add-support-for-art-runtime-on-android
Also this forum post that talks a bit about Unity3D and ART, but there are no solutions: http://forum.unity3d.com/threads/questions-about-android-4-4.215508/
If you are using Dalvik, then I don't know what it might be.
You can check if you're using Dalvik or ART in the Developer options in Settings. The option is called "Select runtime".

Related

Problems running app on actual device

OK, please take it easy on me, I am new to the whole Xamarin community. I have built a simple calculator app using MVVMCross. When I run the app in an emulator everything works great. It still needs some UI attention, but functionally it all works. When I go to archive it and make an install on my phone, it installs just fine. The issue is when I go to run it. As soon as it opens I get an error message. "Calculator.UI.Droid has stopped" Open app again. I have gone through everything I can find online to do this and nothing is working.
Here is my setup:
Visual Studio 2017 Community with latest updates
Windows 10 with latest updates
Latest Java SDK
Project Properties:
Compile using Android Version 7.1 (Nougat)
Minimum Android Version 5.0
Target Android Version 7.1
Use Fast Deployment - false
Generate one package (.apk) per selected ABI - unchecked
Enable ProGuard - checked
Linking - SDK and User Assemblies
Android Phone:
Google Pixel 2 with latest updates.
Any help would be appreciative. Just let me know if you need more information. Thanks in advance
I myself are also using Xamarin, and quite often I get this problem, most times it is related to the code, so please make sure that's the case.
comment out your calculator stuff, and try running the basic app on your physical device. if that works try to find the problem, idk if you can use breakpoints because your problems happens on boot.

Lime 5.2.1 / Android 4.3 : dlopen fails on stpcpy

I'm trying to build an empty HaxePunk project for Android to test the build chain, and while I'm never getting any error, all my attemps have crashed at run time with the same error message :
Error: dlopen failed: cannot locate symbol "stpcpy" referenced by libzlib.so...
I am running the executable on a pretty old phone with Android 4.3 on it ; a Sony Xperia M.
I have been doing a bit of research, and so far I mostly see the same things being repeated : update your NDK (I've been using the latest one from the android dev website and not the one lime setup android downloads), build for previous API versions (which I am also doing with <config:android target-sdk-version="18" /> in my project.xml file). So I don't know what I'm doing wrong, if anything.
Another thing I found is that I'm using the git version of HXCPP, and when I built the Android libs with neko build.n android in the project subdir, it was using -DHXCPP_ANDROID_PLATFORM=26 whereas the Lime build of my project is using -DHXCPP_ANDROID_PLATFORM=9, so that can't be good. However, I don't really know much about Android at all, but I have read that the SDK version and Android platform are two different things, or so I've read.
Any help with this will be much appreciated.
EDIT : Okay so something weird happened : up until now I was trying to install the APK manually by copying it to my phone's files and launching it from there, which kept crashing. I tried lime test android once without changing anything at all and it worked fine, and from then I could manually install the APK like I used to, and the error never happened again. I can't replicate it, but it's still an open case.

Android App Made in Qt Not Launching

I am getting started with developing an application for Android using Qt 5.8 and am running into issues running a basic application. When I run a basic application on an Android emulator, the application fails to load and a lot of errors are printed to the Qt console. Text file of errors
Images of Qt Creator, emulator, and errors
I followed tutorials online on getting the Android development environment set up, and as far as I know, I have the SDK, the NDK, Java, and ant all set up correctly.
From "create a project" in Qt, I selected the Qt Quick Control Application, and set the kit for Androidx86 and desktop. I basically kept the application as it came, but added a teal background and two text fields, but didn't change any code.
When I run the program for desktop, it works fine and opens as shown with clickable buttons and typeable text fields. But when I try to deploy the application on any emulated Android application on 7.1, the emulator boots properly but the app that displays is just this.
The error messages that show up in the Qt Designer are and here is a file dump of the whole list of errors that showed up from trying to run the app.
I am unable to figure out what these errors mean, as I installed Qt and the android files according to the documentation but still encountered these errors and was hoping someone would know what the issue was?
Probably related to the service change or similar (QtActivity etc.) Please check the following link. (Bug fixed and resolved) Fix version: 5.7.0 RC
https://bugreports.qt.io/browse/QTBUG-52373

Error while running app in android emulator

So I have just started my first app in which I have a button and when user clicks on it then it just print the message.
But when I build the app and when I run that app on android studio's console then after opening it crashes and then it stops working.
Meanwhile I have searched for the error and they suggested me to see logcat table or the text file in which I can easily see the errors but after it I am stuck because I have no idea that how can I solve such problem.
Please help me with it.
Not sure how capable you are with android and you haven't given us much info to work with.
could you post a brief description of the logcat from launching the apk to the apk actually crashing?
the logcat is gonna be the best option to diagnose it.
Are you using the android sdk and emulator?
Have you updated the resources and api's?
If you go into the resource list there should a online repo with a whole lot more SDK bits you might find help.
What api's and android version is your apk built from and is your emulator emulating the same android build?
Could be the apks GUI resolution or script related, have you checked through it all?
Microsoft visual studios has a very good debug system and trouble shoot but I'm not sure if android is compatible as I've only used wp8 on it. Worth finding out though.

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

Categories

Resources