Cannot build my app
When I run androidjs build command, building starts but I'm getting a long list of errors: https://pastebin.com/6umrBJ5T
Update apktool
non zero exit code: failed to build apk
W: W/ziparchive(13784): Unable to open 'C:\Users\Krzy�\.androidjs\cache\1.apk': Illegal byte sequence
W: W/zipro (13784): Error opening archive C:\Users\Krzy�\.androidjs\cache\1.apk: I/O error
W: C:\Users\Krzy�\.androidjs\cache\androidjs-sdk\res\values\styles.xml:13: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Widget'.
W:
W: C:\Users\Krzy�\.androidjs\cache\androidjs-sdk\res\values\styles.xml:14: error: Error: No resource found that matches the given name: attr 'android:layout'.
W:
W: C:\Users\Krzy�\.androidjs\cache\androidjs-sdk\res\values\styles.xml:18: error: Error: No resource found that matches the given name: attr 'android:windowFullscreen'.
W:
W: C:\Users\Krzy�\.androidjs\cache\androidjs-sdk\res\values\styles.xml:17: error: Error: No resource found that matches the given name: attr 'android:windowNoTitle'.
W:
W: C:\Users\Krzy�\.androidjs\cache\androidjs-sdk\res\values\styles.xml:22: error: Error retrieving parent for item: No resource found that matches the given name '@android:style/Animation'.
W:
W: C:\Users\Krzy�\.androidjs\cache\androidjs-sdk\res\values\styles.xml:23: error: Error: No resource found that matches the given name: attr 'android:windowEnterAnimation'.
...
The same problem
Or delete values when do error from res
But I have a very simple app. Only two screens with one button.
This is problem with "SDK" androidjs, not with your app. You need fix it in SDK
I decided to reinstall androidjs-builder but now I have these installation errors:
PS C:\Users\Krzyś\Desktop\Projects\Git\app-sms> npm install -g androidjs-builder
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN registry Unexpected warning for https://registry.npmjs.org/: Miscellaneous Warning EINTEGRITY: sha512-gTDqd/qv2wVjvrbTvValLU/wKeYWbVWZ7Ils3kGEtfppARMg82WkhNd+Ovmmig+FKrFXWwXd2VVcwIkX3oToOQ== integrity checksum failed when using sha512: wanted sha512-gTDqd/qv2wVjvrbTvValLU/wKeYWbVWZ7Ils3kGEtfppARMg82WkhNd+Ovmmig+FKrFXWwXd2VVcwIkX3oToOQ== but got sha512-CWxRlb2HtK3tw3oD5fil2aDozYZqCJyNgB2tjXi+COB123NsOPfhtuQkqLZX5m9vdUlAKtpMp6fkI9dfGS24Aw==. (3832240 bytes)
npm WARN registry Using stale data from https://registry.npmjs.org/ due to a request error during revalidation.
npm ERR! code EINTEGRITY
npm ERR! errno EINTEGRITY
npm ERR! Invalid response body while trying to fetch https://registry.npmjs.org/typescript: Integrity verification failed for sha512-gTDqd/qv2wVjvrbTvValLU/wKeYWbVWZ7Ils3kGEtfppARMg82WkhNd+Ovmmig+FKrFXWwXd2VVcwIkX3oToOQ== (C:\Users\Krzyś\AppData\Roaming\npm-cache\_cacache\content-v2\sha512\81\30\ea77faafdb0563beb6d3bd56a52d4ff029e6166d5599ec896cde4184b5fa69011320f365a484d77e3af9a68a0f852ab1575b05ddd9555cc08917de84e839)
@docentYT can you please uninstall first then try reinstalling.
and for the error you posted that was because of SDK itself, it might be possible that SDK wasn't downloaded properly so what you can do is, you can re-download the SDK with the following command, which should help
$ androidjs update
check out the docs for more info: https://android-js.github.io/docs
or join the Androidjs Slack channel for a faster response: https://androidjs.slack.com/
@docentYT can you please uninstall first then try reinstalling. and for the error you posted that was because of
SDKitself, it might be possible thatSDKwasn't downloaded properly so what you can do is, you can re-download theSDKwith the following command, which should help$ androidjs updatecheck out the docs for more info: https://android-js.github.io/docs or join the
AndroidjsSlack channel for a faster response: https://androidjs.slack.com/
Sorry for not responding, but I didn't have access to the Github. I reinstalled everything and upgraded the sdk.
I also have the same issue. As far as I can tell it is because androidjs uses the C:\Username.androidjs\cache folder, but if the username happens to contain a non-ASCII character, this happens. A solution could be if anyone can tell how to change cache directory, or the dev adds support to non-ASCII characters in the program. Edit: just built the exact same project successfully on a linux machine with a user containing regular ASCII characters. Same project, error on windows.
I also have the same issue. As far as I can tell it is because androidjs uses the C:\Username.androidjs\cache folder, but if the username happens to contain a non-ASCII character, this happens. A solution could be if anyone can tell how to change cache directory, or the dev adds support to non-ASCII characters in the program. Edit: just built the exact same project successfully on a linux machine with a user containing regular ASCII characters. Same project, error on windows.
My username is Krzyś so ś can be a problem.
@ZK-industries thanks for highlighting this point, we are working on providing support for other UI development frameworks. will try to resolve this issue with the next release of androidjs-builder.
Currently, there is no such configuration to change the builder cache directory. but if required you can build the androidjs-builder from the source and update the cache directory here
/// src/bin.ts
const builder: Interfaces.IBuilder = {
dir: __dirname,
commander: new Command(),
cache: path.join(process.env.HOME || process.env.USERPROFILE || process.env.HOMEPATH, '.androidjs', 'cache'),
debug: false
};