Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning: application@android:isGame was tagged to replace other declarations but no other declaration present #50224

Closed
madmiraal opened this issue Jul 6, 2021 · 12 comments

Comments

@madmiraal
Copy link
Contributor

Godot version

3.4.beta 009aa63

System information

Ubuntu 21.04

Issue description

When building an Android AAB there is a new warning:

AndroidManifest.xml:16:5-27:19 Warning: application@android:isGame was tagged at AndroidManifest.xml:16 to replace other declarations but no other declaration present

Note: This does not happen when building an APK.

Regression from #50028 cherry-picked to 3.4 with #50202 cd64bcd

Steps to reproduce

Install the Android Build Template. Create an Android preset. Select Use Custom Build. Select Export Format: Export AAB. Try to export the project.

Minimal reproduction project

Any project will do, but here is a simple one:
HelloAndroid.zip

@akien-mga
Copy link
Member

akien-mga commented Jul 6, 2021

Weird, without the replace I would instead get a build error due to the replacement. Did you make sure to install the Android source template matching 009aa63? To have the actual AndroidManifest.xml changes from #50028.

Not directly related but it looks like I lost something important in the 3.x cherrypick (edit: fixed by #50227): cd64bcd#diff-377ee420a453ec4edc4386ce958aa86361d43c974aa7d96c5fa981b3bc14a939L270

@madmiraal
Copy link
Contributor Author

Did you make sure to install the Android source template matching 009aa63? To have the actual AndroidManifest.xml changes from #50028.

I've tried again: Rebuilt the editor, rebuilt the template and copied it to the template directory, deleted the project's android folder and reinstalled the template via the editor and when I export to AAB it still reports the warning.

@madmiraal
Copy link
Contributor Author

I've just tried again with 7c8cc03 i.e. with #50227, and now the Gradle build fails! 😕

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processDebugManifest'.
> com.android.manifmerger.ManifestMerger2$MergeFailureException: org.xml.sax.SAXParseException; lineNumber: 19; columnNumber: 7; The element type "manifest" must be terminated by the matching end-tag "</manifest>".

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

@akien-mga
Copy link
Member

akien-mga commented Jul 6, 2021

Oops, sounds like I introduced a syntax error. I don't see it in the diff, it seems consistent to what was working before my changes... I'll look into it.

Edit: Found it, pesky comma.

@akien-mga
Copy link
Member

akien-mga commented Jul 6, 2021

After #50230 which fixes #50224 (comment) (sorry for the regression), I don't reproduce the warning in the OP in a build of 031a034. Maybe it was a side effect of the error fixed by #50227?

Though I do notice that my android/build/AndroidManifest.xml only has:

<application android:label="@string/godot_project_name_string" android:allowBackup="false" android:icon="@mipmap/icon">

So indeed android:isGame is not present.

Edit: Now I can see the warnings after toggling package/classify_as_game. Not sure why it didn't trigger before.

@akien-mga
Copy link
Member

Ah lol, I forgot to read my own comment...

<!-- Any tag in this line after android:icon will be erased when doing custom builds. -->

So my alphabetic reordering in cd64bcd broke. That's specific to 3.x then (and I had only tested master, my bad).

@akien-mga akien-mga modified the milestones: 4.0, 3.4 Jul 6, 2021
akien-mga added a commit to akien-mga/godot that referenced this issue Jul 6, 2021
… cherry-pick

The `android:icon` attribute is expected to be the last one in the application
definition, as documented by the comment. cd64bcd missed that and caused some
arguments to be truncated.

Fixes godotengine#50224.
@akien-mga
Copy link
Member

Confirmed that the warning is solved by #50234 and the AndroidManifest.xml includes:

    <application android:label="@string/godot_project_name_string" android:allowBackup="false" android:isGame="true" android:requestLegacyExternalStorage="false" tools:ignore="GoogleAppIndexingWarning" android:icon="@mipmap/icon">

@akien-mga
Copy link
Member

Fixed by #50234.

@madmiraal
Copy link
Contributor Author

I've just tested with ac8807b i.e. including #50234, and I'm still getting the same warning message.

@madmiraal madmiraal reopened this Jul 7, 2021
@akien-mga
Copy link
Member

akien-mga commented Jul 7, 2021

That's puzzling... I'll retest again but with #50234 I wasn't getting it myself.
Of course make sure that you do reinstall the source template as it's the one affected (but I suppose you did).

Can you share the application tag in your android/build/AndroidManifest.xml?

@akien-mga
Copy link
Member

I tried again with 31143ba and I can't reproduce the issue.

Testing procedure:

  • Built editor for Linux, release and release_debug template for Android
  • Installed Android templates in ~/.local/share/godot/templates/3.4.beta
  • Created a new project
  • Installed Android source template
  • Exported with the following configurations:
    • Custom Build, AAB, Classify as Game ON
    • Custom Build, AAB, Classify as Game OFF
    • Custom Build, APK, Classify as Game ON
    • Custom Build, APK, Classify as Game OFF
    • Prebuilt APK, Classify as Game ON
    • Prebuilt APK, Classify as Game OFF

@madmiraal
Copy link
Contributor Author

Okay. My bad. It was still using an old copy of the android_source.zip; so deleting and reinstalling the Android Build Template wasn't updating anything. I've updated my build scripts to properly copy the android_source.zip file to my templates/3.4.beta/ directory and now it works. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants