Let me start by saying that i'm new to Xamarin/Cocossharp and game development in general.
I did a very basic game/application starting from the Cocossharp template for Shared application in VS2015. Now my app works well on WP (Emulator & Device) but wont start up on android.
After the emulator laoded this is what i get:
android 4.4 emulator
No Exception has been generated. I only get those errors in the output window, but they don't actually crash the application:
debug output
it looks like the Android version of the app doesn't go further than the class MainActivity.cs, which is generated by the template and should not be necessarily modified. Btw I have the same problem while trying to execute the examples from Xamarin.com
strugling with this issue since two days, help would be very appreciated!
This issue was already answered.
It was only necessary to set GPU emulation to true in Hardware properties of the virtual device.
Related
I've just begun Android development and set up my Android Studio and Emulator up with minimum version of the project API as KitKat and maximum version as Oreo (8.0). I created an empty activity to start of with and wanted to test it out but when I run it I only get the following screen (it is literally transparent):
I've already changed my emulated performance graphics to Hardware - GLES 2.0. I've also tried cold booting and cancelling the saved state but to no avail. Here are the other AVD settings:
I would appreciate any help as I am very eager to get started. Thank you!
Okay try to create a new virtual device.
And if then also it doesn't work then you can also run your application on your real device
I am developing using Unity5.3.5f1 (64 Bit) and have a problem with a black screen on my Nexus 7 Android version 4.4.3 every time I try to launch the app.
I try to implement the Vuforia Object Recognition Unity Sample (https://developer.vuforia.com/library//articles/Training/Vuforia-Object-Recognition-Unity-Sample-Guide) so it should work while I followed the instructions.
I didn't modify the code, just followed the instructions to add the 3D target.
I followed the hints of the developer forum to set the player settings for building https://developer.vuforia.com/forum/issues-and-bugs/camera-not-working-when-app-installed-mobile but nothing changed the situation:
Setting Rendering Path to "Legacy Deffer"
changing the Minimum API Level to Android 4.2
enable "GPU skinning"
set graphics APIs to "OpenGLES2"
I have noticed a lot of problems between unity and mobile devices when building. There seems to be some residual meta data left on the device from unity so not all changes end up working properly (which holds the information of what objects the script is attached to). I had an instance where I deleted EVERYTHING in my scene and I had a debug script attached to some of those items that would output some text to the Xcode console in the scripts start() method. After cleaning out the entire scene and redeploying that debug script was sill outputting to the console. I deleted the .meta file associated with that script and redeployed. This deletion stopped the file from running. I have noticed that restarting the device can also fix this issue. Also deleting the meta, deploying, then undoing the delete and running again also fixes some of these issues. You will NOT notice this problem when developing in unity and breakpoints will never be hit, but it will still happen on the mobile device and even run scripts that you completely disabled.
Right after start of app, my app crushes without error message on a device. This only happens on Samsung Note 1(at least, can't test on all devices), but not on Motorola Moto G or Galaxy s4mini. The only hint I get is in the debugger. I pasted it below. What exactly is happening and why it crashes only on some devices?
Edit: it crashes also on return to the app from "running apps" menu. Note 1 has CyanogenMod installed. Maybe this has something to do with the crashing.
Edit2:Another observation: note 1 allocates only a half of the memory as the other two devices. Has this anything to do with the crash?
01-05 17:00:16.212 13486-13513/com.mygdx.myGame.android D/dalvikvm: Trying to load lib /data/app-lib/com.mygdx.myGame.android-2/libgdx-freetype.so 0x42441a58
01-05 17:00:16.222 13486-13513/com.mygdx.myGame.android D/dalvikvm: Added shared lib /data/app-lib/com.mygdx.myGame.android-2/libgdx-freetype.so 0x42441a58
01-05 17:00:16.222 13486-13513/com.mygdx.myGame.android D/dalvikvm: No JNI_OnLoad found in /data/app-lib/com.mygdx.myGame.android-2/libgdx-freetype.so 0x42441a58, skipping init
The function "JNI_OnLoad" is not essential for an android app. It is not even an error. Your problem is from another part of your code. Even if you have not provided this function, your program should run normally.
References on JNI_OnLoad which can be helpful - Link 1 | Link 2 | Link 3
There is a way to fix it though-
Try to use ndk-gdb to fix it.
References for ndk-gdb - developer.android.com | Stackoverflow
I do have this issue in like most of the projects I have worked on. It is nothing related to Android app getting crashed.
There is something else in your app that is crashing. Some tips to consider which will help you debug-
Check Playstore(if its on playstore) for logs(what exactly the error is). They give stack trace which helps to debug.
If its not on Playstore, only way to go forward is to do remote debug on the mobile which is giving the error.
I have had such experiences, and its MOST OF THE TIME because of API change. What I mean is, APIs would have changed from one Android version to another(Kitkat to Lollipop - there are lots of breaking changes!) Check this once. Most of my apps had lots of issues because of this.
Some mobile's are strict when it comes to DB(sqlite or whatever you use on the phone) transactions. I mean, in one of the application, when the DB was not closed at the end of all transactions, the app was getting Force closed in most Samsung & HTC mobile phones. While it worked very well on most other phones.
Hope it helps :) Happy coding!
Note to self: "Always use asset manager and texture atlases"
Over the course of developing I eventually replaced all textures with texture atlases and combined with asset manager. I didn't change any logic at all. Somehow the app stopped crashing. Can't explain it but I thing the asset manager and texture atlases did the trick.
I'm using the ImpactJS framework for work and I've tried what most of people did to get their games to work but with no luck, most recently I tried following the instructions from this thread: http://impactjs.com/forums/help/cocoonjs/page/1.
It seems whatever I do CocoonJS refuses to launch the Impact framework (I've tried with both a game and with just the framework alone but nothing happens), whenever I launch the game I get a black screen running at about 60 fps.
Again I'm just trying to get the framework itself working but even that seems impossible. Does anyone have any suggestions?
I'm pretty sure you have a javascript error (see console log), or maybe you have debug enabled on ImpactJS (debug requires DOM, not supported by CocoonJS)
I am trying to test my app on android emulator. So as soon as, i am choosing run the application, a new window pops up on the screen and after taking 1-2 minutes, it goes not responding.
I also tried running the emulator separately using AVD manager. Using this, i am able to start the emulator; but after 3-4 minutes - it goes "not responding".
OS- Windows 7 32 bit [ intel pentium 3.00 GHZ + 2GB RAM]
Java - 1.6
Android SDK - i have the latest SDK with 3.0 OS
IDE - eclipse Helios Service Release 2.
Plz help, i am unable to do anything.
Update: can you guys point me towards other 3rd party emulators which i can use?
Update2: My emulator is taking too much time in launching now. Can this be a cause? If yes, then how do i decrease the boot time?
(This isn't so much of an answer, but might go some way to figuring out the source of the problem; I'd comment on the original question instead but don't have enough rep to do so)
I keep having this problem too. I have an app with a few activities, one of which contains a layout with a Canvas which runs its own thread to do drawing processing. All of the activities run fine except for this Canvas activity which seems to crash the emulator in the way the OP described (the emulator .exe itself crashes rather than the application within the emulator) if left to run for a few minutes. As far as I can tell I'm not doing anything unusual with the thread - I copied the Lunar Landar example in the SDK and worked from that so I'm doing everything "by the book". The app runs fine on real devices.
So, while I realise the OP may be long gone, could anyone else with a similar problem confirm that the affected Activity is using a Canvas, drawing Thread, or anything like that? This problem is a real pain and I can't find any other discussions/solutions for the matter.
EDIT: I recently did a complete, clean re-install of the most recent versions of Eclipse and the Android SDK with all the updates and that seemed to solve the problem. Guess there was a bug in an older version of the emulator that was fixed in a more recent release.
Have you enabled snapshots. If you enabled it then you can be trying to open a incorrectly saved snapshot. If so, while starting the emulator with launch options, uncheck launch from startup
#mudit:remember Android 3.0(Honeycomb) is dedicated entirely to only tablets and not the mobile phones..
Does the emulator prompts you "not responding" in your app or when you just start the emulator without launching an app, too?
A strong advice: you don't need to restart the emulator for every app launch, just keep him running (maybe you already do that).
Does the logcat show some errors prior to the "not responding"? Have you tried creating another AVD?