[4.7] Android Packaging fails due to '-' in package name

There are a few bugs with packaging for android with 4.7.

  1. Having a hyphen ‘-’ in your package name causes javac not to find the semicolon at the end of the package line in /[project root]/Intermediate/Android/APK/gen/com/[your-name-here]/[yourProjectHere]/BuildConfig.java, and R.java, in the same folder. This causes packaging to fail. Might be user error on my part, but still a bug.
  2. When changing package names in the Android pane of the Project Settings window, UE4 creates a new set of folders with the new package name, but does not remove the old ones. This compounds the above problem, because even if you fixed the name, it is still trying to compile with the old files as well.

I am aware that the issue with hyphens will probably not go away, due to how java works. However, I would suggest implementing some form of error filtering in (at the very least) the package name input field. Even a lowly tooltip would be nice.

Also, please do try to make the editor clean up after itself when switching package names.

Howdy Axtel,

Thank you for reporting this issue that you have been running into. I have written Jira report UE-11360 and placed this report into our bug database so that the issue may be addressed. I will be sure to keep you updated as I see any progress being made or if this is by design.

If it is by design, then I will place a feature request in to better explain that no ‘-’ can be used in the title.

Thanks and have a great day!