Android project build Error type 3

Got a specific openfl android project that ends the build with :


Total time: 17.198 secs

  • daemon not running; starting now at tcp:5037
  • daemon started successfully
    D:\WORK\HXPROJECTS\haxeui_test2\bin\android/bin/app/build/outputs/ap…uitest2-debug.apk: 1 file pushed. 2.5 MB/s (7042624 bytes in 2.652s)
    pkg: /data/local/tmp/haxeuitest2-debug.apk
    Starting: Intent { act=android.intent.action.MAIN cmp=haxeuitest2/.MainActivity }
    Error type 3
    Error: Activity class {haxeuitest2/haxeuitest2.MainActivity} does not exist.
    --------- beginning of main
    --------- beginning of system

Everything else I tested with after runs great on the device. Though this one despite being pushed doesn’t start because there’s no MainActivity, either I borked the project somehow or there’s something specific about this one that is making it create an invalid apk with no MainActivity for some reason.

Hmm, could you try 1.) uninstalling the app from the device and 2.) doing openfl test android -clean? What is your <meta package="" /> set to?

Can’t seem to find the app on the device, meta package=“haxeuitest2”, did a -clean rebuild but it came out the same error.

Perhaps for Android, try having a longer package name, like com.example.haxeuitest2, I’m not sure, but I have seen on certain platforms, that two or three “segments” are required in the package name

Pretty sure Android requires 3.

1 Like

Added the three package segments, on first -clean rebuild it throws:
"adb server version (31) doesn’t match this client (39); killing…"
but on subsequent builds it went through and is running ok, no messages about mismatched adb versions.

1 Like