nosferat
nosferat

Reputation: 931

Haxe NME project with Android target fails to deploy: Activity class does not exist

I created an NME project in FlashDevelop, in the Main.hx I loaded a Bitmap then clicked on the build button with android as target. The build successfully finishes but then I get the following error:

Running process: C:\Motion-Twin\haxe\haxelib.exe run nme run "C:\Users\...\...\flash-develop\haxe-nme-playground\NMEAndroidTest\application.nmml" android adb server is out of date.  killing...
* daemon started successfully *     pkg: /data/local/tmp/NMEAndroidTest-debug.apk

Failure [INSTALL_FAILED_CONTAINER_ERROR]

518 KB/s (1838507 bytes in 3.460s) Starting: Intent { act=android.intent.action.MAIN cmp=com.test.nme.android.NMEAndroidTest/.MainActivity }

Error type 3

Error: Activity class {com.test.nme.android.NMEAndroidTest/com.test.nme.android.NMEAndroidTest.MainActivity} does not exist.

However the Activity does exists: MainActivity exists

The contents of the AndroidManifest.xml:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="preferExternal" android:versionCode="2" android:versionName="1.0.0" package="com.test.nme.android.NMEAndroidTest">

    <application android:label="NMEAndroidTest" android:debuggable="true" android:icon="@drawable/icon">



        <activity android:name="MainActivity" android:label="NMEAndroidTest" android:configChanges="keyboard|keyboardHidden|orientation">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
                <category android:name="ouya.intent.category.GAME"/>
            </intent-filter>

        </activity>

    </application>

    <uses-sdk android:minSdkVersion="8"/>

    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.VIBRATE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

</manifest> 

NME should run on Android out of the box and I did not do anything crucial that could break it.

Upvotes: 0

Views: 820

Answers (1)

stroncium
stroncium

Reputation: 1430

Note this message in your logs: Failure [INSTALL_FAILED_CONTAINER_ERROR]

That means APK file built by Android SDK contained error and was discarded(not installed) on your device/emulator, hence the activity doesn't exist.

Look into the way your android SDK works. This line: android adb server is out of date. killing... is suspicious too. If I were in your shoes the first thing I'd try would be to update(and maybe reinstall if it doesn't help) Android SDK.

Upvotes: 1

Related Questions