Flash develop Android debug crashes, release does not

121 views
Skip to first unread message

flashyourface

unread,
Jun 10, 2015, 3:43:22 PM6/10/15
to haxe...@googlegroups.com
Hey All,

Im having an interesting problem when trying to debug an extremely basic app using Flixel for Android. 
If I select release build, everything works fine however I dont get traces. 
When I select debug for export it crashes on the device directly after opening.
 I was wondering if anyone had a fix for this, here is my code: 

Enter code here.package;

import flixel.FlxG;
import flixel.FlxSprite;
import flixel.FlxState;
import flixel.text.FlxText;
import flixel.ui.FlxButton;
import flixel.util.FlxMath;

/**
 * A FlxState which can be used for the game's menu.
 */
class MenuState extends FlxState
{
/**
* Function that is called up when to state is created to set it up. 
*/
override public function create():Void
{
add(new FlxText(10, 10, 100, "Hello, WORLD"));
trace('is this working');
super.create();
}
/**
* Function that is called when this state is destroyed - you might want to 
* consider setting all objects this state uses to null to help garbage collection.
*/
override public function destroy():Void
{
super.destroy();
}

/**
* Function that is called once every frame.
*/
override public function update():Void
{
super.update();
}
}..

Thanks 

Ashiq A.

unread,
Jun 10, 2015, 3:44:25 PM6/10/15
to haxe...@googlegroups.com
What do you see in the android logs (catlog)?

--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

flashyourface

unread,
Jun 10, 2015, 5:11:37 PM6/10/15
to haxe...@googlegroups.com
This is the last portion of the output:

BUILD SUCCESSFUL
Total time: 11 seconds
Build succeeded
Done(0)
haxelib run lime run "Project.xml" android -debug
Running process: C:\HaxeToolkit\haxe\haxelib.exe run lime run "Project.xml" android -debug
/system/bin/sh: can't create C:\Users\user\AppData\Local\Temp/temp_1757805: No such file or directory

        pkg: /data/local/tmp/FlixelTut-debug.apk

Success

2626 KB/s (5535735 bytes in 2.058s)
Starting: Intent { act=android.intent.action.MAIN cmp=com.example.myapp/.MainActivity }

Done(0)


Rafael Oliveira

unread,
Jun 10, 2015, 6:07:48 PM6/10/15
to haxe...@googlegroups.com
You can use the option -verbose to see a more complete log in the console.

lime test android -debug -verbose 

flashyourface

unread,
Jun 12, 2015, 3:28:32 PM6/12/15
to haxe...@googlegroups.com
It looks like an issue with flixel. I created a basic lime project in flash develop and debug worked on android. Now my new problem is no traces from debug in flash develop.

Carlos Madrazo

unread,
Jun 12, 2015, 10:56:44 PM6/12/15
to haxe...@googlegroups.com
Hi. You can see the traces in logcat (I think you can see them in a program called "monitor" in the android tools), but you can also open a cmd window (from a flash developer icon) and type: "haxelib run lime trace yourproject.xml android" , and see the traces there (I have not tried it recently)

flashyourface

unread,
Jun 12, 2015, 11:05:59 PM6/12/15
to haxe...@googlegroups.com
AH! Thank you Carlos your suggestion on 'monitor' is exactly what I used to fix my situation, even posted some info here:



I have not tried the  "haxelib run lime trace yourproject.xml android" you mentioned though I will sometime this weekend. 

Thanks for input!

Junjo

unread,
Jun 13, 2015, 7:11:15 AM6/13/15
to haxe...@googlegroups.com
Hi flashyourself,

What was the problem with the crash on debug mode? how do you fixed it?
I'm running in this problem too, but the logcat doesn't give me any insigh :(

flashyourface

unread,
Jun 13, 2015, 3:36:30 PM6/13/15
to haxe...@googlegroups.com
Hey Junjo,

I didnt really fix it, I just created a project with openfl and that was working. 

I did a very basic bitmap loader and showed a jpg. It worked in release and debug and  I was able to get traces using the tools/monitor from the android sdk.

Hope that helps! 


On Wednesday, June 10, 2015 at 12:43:22 PM UTC-7, flashyourface wrote:

flashyourface

unread,
Jun 13, 2015, 3:53:40 PM6/13/15
to haxe...@googlegroups.com
AH!! I think I just found the main problem!

I just used an openfl textfield and added that to my basic image loading app. As soon as I added the text field my device would crash in both release and debug. That is exactly what was happening when I made a flixel project and did the helloworld textfield however that only crashed debug, this is crashing both.

The fix is to include the font and add with text format. So something like this: 
var f:TextFormat = new TextFormat(Assets.getFont("Assets/arial_0.ttf").fontName,30);
var tf:TextField = new TextField();
tf.defaultTextFormat = f;
tf.text = 'YOOOO WORKING';
tf.width = 400;
addChild(tf);

Hope this helps someone.


On Wednesday, June 10, 2015 at 12:43:22 PM UTC-7, flashyourface wrote:
Reply all
Reply to author
Forward
0 new messages