Error: <identifier> expected

Hi dear communitiy I updated openfl to 6.2.2 lime to 5.7.1 hxcpp to 3.4.188 changed my NDK to r13b and the target-sdk-version is 23 but I cant get an android build of my project the results shows this constantly

Hope U can Help me!
THX to all

Try making a build from the command line (like openfl build android -verbose) and see if you get any additional information.

Perhaps the newer SDK wants a newer Java version. Nowadays I think Java 8 is the recommended version

Thanks for quick response. I’m using JDK1.8_121x64 the command line build result was like this:

Oh, interesting

Okay, it looks like “new” in your package ID is causing Java compilation errors. We could try and make a workaround in the tools, or you could use a different package name, if it isn’t a big issue?

You are right, sorry to take your time over such a simple issue but the volume of the .apk file is unexpectedly large is it normal?

Is it possible you are including more files from your Assets folder than you expected? Can you check your “Export/Android” directory and see if there are more files under “bin” than should go in the project?

1 Like

Funny thing is that I didn’t use any assets in this project but the bin folder is 742Mb :hushed:

That seems odd, try a -clean -verbose build, and see what files are copied?

1 Like

Couldn’t get anything different but the whole code is this:


import openfl.display.Sprite;
import openfl.Lib;
import motion.Actuate;


  • @author MostafaTaheri
    class Main extends Sprite
    var sp:Sprite;
    public function new()
    sp = new Sprite();, 1);, 0, 200, 300);
    sp.addEventListener(MouseEvent.MOUSE_DOWN, show);
    // Assets:
    // openfl.Assets.getBitmapData(“img/assetname.jpg”);
    public function show(e:MouseEvent){
    Actuate.tween(cast(e.currentTarget, Sprite), 2, {x:Math.random() * 300, y:Math.random() * 300}, false);


If you do something like this command:

openfl update android -clean -verbose

It will print all of the files that are copied. You can look at the files that are copied, and see if there is anything out of the ordinary. You can also check the final “Export/android/bin” size again.

1 Like

This is the result:

I used openfl build android -clean -verbose
and the .apk size is back to normal:thinking:

Okay, so maybe there was something that got copied in a previous build, that was no longer used or needed. Good news! We don’t remove old files automatically if the file names change, but perhaps we might be able to write a manifest of copied files in the future, so that we can track files that copied automatically and remove them during a non-clean build

1 Like