node-on-mobile/node-on-android

roundIcon resource error

avaer opened this issue · 0 comments

avaer commented
No resource identifier found for attribute 'roundIcon' in package 'android'

According to my reading the base apk is not forward-compatible to newer sdk versions which do not allow roundIcon. Hacking it out fixes the issue, but I don't know what the build infrastructure is like or what shape the PR should have.

Full output belog:

$ npm run build

> node-on-android-example@0.0.1 build /home/k/node-on-android/example
> ../cli/bin.js app -o ../build/app.apk -b /usr/local/bin

I: Using Apktool 2.3.1-dirty on base.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: /home/k/.local/share/apktool/framework/1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
I: Using Apktool 2.3.1-dirty
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
W: /tmp/node-on-android-1515582291466/base/AndroidManifest.xml:5: error: No resource identifier found for attribute 'roundIcon' in package 'android'
W: 
Exception in thread "main" brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/usr/bin/aapt, p, --min-sdk-version, 19, --target-sdk-version, 24, --version-code, 1, --version-name, 1.0, --no-version-vectors, -F, /tmp/APKTOOL1865625931939927759.tmp, -0, arsc, -0, js, -0, arsc, -I, /home/k/.local/share/apktool/framework/1.apk, -S, /tmp/node-on-android-1515582291466/base/res, -M, /tmp/node-on-android-1515582291466/base/AndroidManifest.xml]
        at brut.androlib.Androlib.buildResourcesFull(Androlib.java:492)
        at brut.androlib.Androlib.buildResources(Androlib.java:426)
        at brut.androlib.Androlib.build(Androlib.java:305)
        at brut.androlib.Androlib.build(Androlib.java:270)
        at brut.apktool.Main.cmdBuild(Main.java:227)
        at brut.apktool.Main.main(Main.java:75)
Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [/usr/bin/aapt, p, --min-sdk-version, 19, --target-sdk-version, 24, --version-code, 1, --version-name, 1.0, --no-version-vectors, -F, /tmp/APKTOOL1865625931939927759.tmp, -0, arsc, -0, js, -0, arsc, -I, /home/k/.local/share/apktool/framework/1.apk, -S, /tmp/node-on-android-1515582291466/base/res, -M, /tmp/node-on-android-1515582291466/base/AndroidManifest.xml]
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:456)
        at brut.androlib.Androlib.buildResourcesFull(Androlib.java:478)
        ... 5 more
Caused by: brut.common.BrutException: could not exec (exit code = 1): [/usr/bin/aapt, p, --min-sdk-version, 19, --target-sdk-version, 24, --version-code, 1, --version-name, 1.0, --no-version-vectors, -F, /tmp/APKTOOL1865625931939927759.tmp, -0, arsc, -0, js, -0, arsc, -I, /home/k/.local/share/apktool/framework/1.apk, -S, /tmp/node-on-android-1515582291466/base/res, -M, /tmp/node-on-android-1515582291466/base/AndroidManifest.xml]
        at brut.util.OS.exec(OS.java:95)
        at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:450)
        ... 6 more
mv: cannot stat '/home/k/node-on-android/example/build/app.apk.aligned': No such file or directory
Done! apk file is stored in:
/home/k/node-on-android/example/build/app.apk