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

android.presplash_color bug #1487

Closed
pynting opened this issue Aug 11, 2022 · 6 comments
Closed

android.presplash_color bug #1487

pynting opened this issue Aug 11, 2022 · 6 comments

Comments

@pynting
Copy link

pynting commented Aug 11, 2022

Not sure if this is a universal problem, but building my app failed when i uncommented the "android.presplash_color" setting in the buildozer.spec file.

Relevant log:

[DEBUG]:        > Task :mergeDebugResources FAILED
[DEBUG]:        /.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/kr/src/main/res/values/strings.xml:3:4: Failed to flatten XML for resource 'presplash_color' with error: Invalid unicode escape sequence in string
[DEBUG]:        "{str}"
[DEBUG]:        /.buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/kr/src/main/res/values/strings.xml:3:4: string/presplash_color does not contain a valid string resource.

And indeed, in the referenced file:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="app_name">Kr</string>
    <string name="private_version">c8a851e76193bfc03b01e371acf67e0f938ddcba</string>
    <string name="presplash_color">'aqua'</string>
    <string name="urlScheme">kivy</string>
</resources>

Problem lies in the buildozer file android.py:

        # support for presplash background color
        presplash_color = self.buildozer.config.getdefault('app', 'android.presplash_color', None)
        if presplash_color:
            cmd.append('--presplash-color')
            cmd.append("'{}'".format(presplash_color))

Changed
cmd.append("'{}'".format(presplash_color))
into
cmd.append("{}".format(presplash_color))
solved the issue for me

Versions

  • Python: 3.10
  • OS: Fedora
  • Buildozer: 1.4.1.dev0
@Olamidipupo-favour
Copy link

I had similar issues.

@Apacelus
Copy link
Contributor

I made a pr to fix this

@pynting
Copy link
Author

pynting commented Aug 24, 2022

Perfect! Do I close this issue, or should the administrator(s) do it?

@Apacelus
Copy link
Contributor

Perfect! Do I close this issue, or should the administrator(s) do it?

Let them do it, or close it after they accept my pr

tshirtman pushed a commit that referenced this issue Aug 30, 2022
Buildozer wont build if a presplash color is set, this should fix it as descrived in #1487
@Apacelus
Copy link
Contributor

@pynting my pr was merged, you can close this issue now

@misl6
Copy link
Member

misl6 commented Aug 31, 2022

Closed via #1497

@misl6 misl6 closed this as completed Aug 31, 2022
Craulback added a commit to Craulback/buildozer that referenced this issue Sep 27, 2022
* Add support --res_xml option in p4a

* res_xml paths are relative to buildozer.spec

* Changes for NDK23 (kivy#1427)

The arch no longer used in url for NDK23+

* Our self-hosted Apple Silicon runner now has been migrated to actions/runner v2.292.0 which now supports arm64 natively (kivy#1438)

* use p4a --add-source instead of manual copy (kivy#1450)

Currently, android.add_src does not work anymore.
Using --add-source from p4a make it work again.

* fix aar build (kivy#1444)

* fix aar build

* update default.spec to include 'debug_artifact'

* Updates default buildozer.spec NDK from 19b to 23b (kivy#1462)

* Update CHANGELOG and prepare release 1.4.0 (kivy#1463)

* Bump version to 1.4.1.dev0 (kivy#1464)

* p4a prerequisites install should be done in non-interactive mode during CI builds. (kivy#1465)

* Avoid the usage of `shell=True` in Popen, which could lead to potential security risks. (kivy#1435)

* Removes (where possible) the usage of shell=True in Popen

* Fixes (needs check on runtime) adb + add a solution for p4a.extra_args

* Change the logic to auto accept the SDK licenses, to avoid the shell=True usage

* Removes six dependency in tests (kivy#1475)

* Fixes some E275 - assert is a keyword. (kivy#1495)

* Fix presplash color (kivy#1497)

Buildozer wont build if a presplash color is set, this should fix it as descrived in kivy#1487

* Show output during aab support check, as p4a may require the user input (kivy#1494)

* Update installation.rst (kivy#1500)

* Update installation.rst

Update jdk and Ubuntu versions.
Update WSL usage instructions.

* Update installation.rst

* Update docs/source/installation.rst

Co-authored-by: Mirko Galimberti <me@mirkogalimberti.com>

* Update docs/source/installation.rst

Co-authored-by: Mirko Galimberti <me@mirkogalimberti.com>

Co-authored-by: Mirko Galimberti <me@mirkogalimberti.com>

Co-authored-by: Eero af Heurlin <eero.afheurlin@iki.fi>
Co-authored-by: HyTurtle <81598434+HyTurtle@users.noreply.github.com>
Co-authored-by: Mirko Galimberti <me@mirkogalimberti.com>
Co-authored-by: Mathieu Virbel <mat@meltingrocks.com>
Co-authored-by: Mikhail Zakharov <mzakharo@users.noreply.github.com>
Co-authored-by: Akshay Arora <akshayaurora@gmail.com>
Co-authored-by: Apacelus <46828271+apacelus@users.noreply.github.com>
Co-authored-by: RobertF <34464649+RobertFlatt@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants