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

Script issue: cannot build #36

Open
ionarevamp opened this issue Oct 25, 2024 · 2 comments
Open

Script issue: cannot build #36

ionarevamp opened this issue Oct 25, 2024 · 2 comments

Comments

@ionarevamp
Copy link

ionarevamp commented Oct 25, 2024

~ ❯ build.buildAPKs.bash                                                             11:27:20 PM
Updating buildAPKs; build.buildAPKs.bash will attempt to load sources from git submodule repositories into ~/buildAPKs.  This may take a little while to complete.  Please be patient while build.buildAPKs.bash downloads source code from https://github.com:
curl: (3) nested brace in URL position 28:
https://maven.google.com/{/{/{/{/{-{.aar
                           ^

BuildAPKs build.buildAPKs.bash at.bash build.buildAPKs.bash trap.bash  ERROR:  Generated script error signal -OL near or at line number 79 by `curl` with return value 3,.[0m
/data/data/com.termux/files/home/buildAPKs/scripts/bash/shlibs/trap.bash: line 28: JDR: unbound variable

Same thing with build.github.bash buildapks as the LIBAUTH file suggests. I also have downloaded all stable versions of appcompat and appcompat-resources into ~/buildAPKs/var/cache/lib

Any pointers would be appreciated.

Update: I have made these changes to ~/buildAPKs/scripts/bash/shlibs/prep.bash, namely just the MCLOOKUP function:

_MCLOOKUP_(){
if [ "$ONEDEP" = "{" ]; then
    return 0
fi
echo "ONEDEP: $ONEDEP"
GROUPID="$(cut -d" " -f1 <<< "$ONEDEP")"
ARTIFACTID="$(cut -d" " -f2 <<< "$ONEDEP")"
VERSION="$(cut -d" " -f3 <<< "$ONEDEP")"
VERSION="$(echo "$VERSION" | sed 's|[^0-9a-zA-Z_.]||g')"
GROUPID="$(echo "$GROUPID" | sed 's|[^0-9\(\)a-zA-Z._\-]||g')"
ARTIFACTID="$(echo "$ARTIFACTID" | sed 's|[^0-9\(\)a-zA-Z._\-]||g')"
echo "GROUPID: $GROUPID"
echo "ARTIFACTID: $ARTIFACTID"
echo "VERSION: $VERSION"
if [ "$GROUPID" = "com.android.support" ]; then
    GROUPID="$(echo "$GROUPID" | sed 's|\.|/|g')"
else
    GROUPID="${GROUPID%%\.*}"
fi
echo -e "BASE URL FORMAT: \nhttps://maven.google.com/${GROUPID}/${ARTIFACTID}/${ARTIFACTID}/${VERSION}/${ARTIFACTID}-${VERSION}\n\n"
echo "test ... ${VERSION} ... test"
[ -f "${ARTIFACTID}-${VERSION}.aar" ] || curl -OL "https://maven.google.com/${GROUPID}/${ARTIFACTID}/${ARTIFACTID}/${VERSION}/${ARTIFACTID}-${VERSION}.aar"
[ -f "${ARTIFACTID}-${VERSION}.jar" ] || curl -OL "https://maven.google.com/${GROUPID}/${ARTIFACTID}/${ARTIFACTID}/${VERSION}/${ARTIFACTID}-${VERSION}.jar"
}

the echo calls are there for debugging, the sed calls are to remove escape sequences that occasionally occur in ONEDEP values, and any ONEDEP value consisting of just "{" is skipped, which solves the original problem. Also, the com.android.support url seems to special so I made a special case for it, although I haven't checked every one--whenever this script was devised, the structure of the website seems to have changed since then, assuming the script was accurate to begin with. Currently trying buildAll.bash, will see if there is any success when building.

There tended to be another error regarding missing resources as referenced by the manifest, but maybe that's just because the artifacts weren't linked properly by the project. I will update with the result.

Update:
Every attempt to build an app seems to give one of three errors:

<some file>.xml:<some line>: error: No resource identifier found for attribute '<some attribute>' in package 'android'

OR

<some file>.xml:<some line>: error: Error: No resource found that matches the given name (at '<some attribute>' with value '@android:<some value>').

AND sometimes the occasional combo,

grep: warning: stray \ before - #maybe this line
res/values/styles.xml:<some line>: error: Error retrieving parent for item: No resource found that matches the given name 'android:<some resource>'.

Update: It does seem to be an aapt issue, as this happens only during the aapt step. I just don't know how to fix it, as any version of it that I use gives the same errors, while I was definitely able to build at least some of the apps in the past (even though a small number actually worked)

Copy link

Thank you for contributing to make this project better😎 Keep up and follow to solve this issue.

@landfillbaby
Copy link

it might be an issue with the termux aapt package?

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

2 participants