4

I develop an application for Android using Adobe AIR and FlashDevelop. Unfortunately my app crashes after start (standard "process has air.HelloWorld stopped" message) and I can't setup debugger (freeze on "waiting for Flash Player to connect to debugger").

When I try to start it in FlashDevelop - it works. The problem arises when I install .apk on emulator and try to start it.

Main.as

import flash.desktop.NativeApplication;
import flash.events.Event;
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.ui.Multitouch;
import flash.ui.MultitouchInputMode;

public class Main extends Sprite {

    public function Main() : void {
        stage.scaleMode = StageScaleMode.NO_SCALE;
        stage.align = StageAlign.TOP_LEFT;
        stage.addEventListener(Event.DEACTIVATE, deactivate);

        // touch or gesture?
        Multitouch.inputMode = MultitouchInputMode.TOUCH_POINT;

        // entry point
        var main : FlixelMain = new FlixelMain();
        addChild(main);
    }

    private function deactivate(e:Event) : void {
        // auto-close
        NativeApplication.nativeApplication.exit();
    }

}

FlixelMain.as

import org.flixel.*;

public class FlixelMain extends FlxGame {

    public function FlixelMain() {
        FlxG.mobile = true;
        super(480, 800, MenuState, 1, 60);
    }

}

application.xml

    <?xml version="1.0" encoding="utf-8"?>
<application xmlns="http://ns.adobe.com/air/application/3.1">

  <id>air.HelloWorld</id>
  <versionNumber>0.1</versionNumber>
  <supportedProfiles>mobileDevice</supportedProfiles>
  <filename>HelloWorld</filename>
  <name>HelloWorld</name>

<android>
    <manifestAdditions><![CDATA[<manifest android:installLocation="auto">
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-feature android:required="true" android:name="android.hardware.touchscreen.multitouch" />
    </manifest>]]>
    </manifestAdditions>

  </android>

  <initialWindow>
    <title>HelloWorld</title>
    <content>HelloWorld.swf</content>
    <visible>true</visible>
    <fullScreen>true</fullScreen>
    <!--<autoOrients>false</autoOrients>-->
    <!--<aspectRatio>landscape</aspectRatio>-->
    <renderMode>cpu</renderMode>
    <systemChrome>standard</systemChrome>
    <aspectRatio>portrait</aspectRatio>
  </initialWindow>

  <icon>
    <image72x72>icons/icon_72.png</image72x72>
    <image114x114>icons/icon_114.png</image114x114>
    <image512x512>icons/icon_512.png</image512x512>
  </icon>
</application>

Exported APK file

http://dynax.boo.pl/HelloWorld.apk

If anyone could check this file on his device or knows this problem I will be grateful :) Greetings.

mkorman
  • 332
  • 2
  • 11

1 Answers1

0

It may have something to do with the speed of your network connection.

If you run the Debugger over a slow connection, for example a WIFI connection from your device, the debugger can't seem to keep up with the amount of data that's send over the network. When you hit a break point, the Stack-traces and local variables are all send over the network.

If your connection creates a bottleneck, it may slow things down enough for the app thinks it's crashed and it then exits.

Running the debugger on a faster network connection may solve your problem.

anber
  • 864
  • 1
  • 12
  • 28