Android Localization Script Latest Build

I haven’t updated my apps in quite awhile, nor have I visited the forum generally, so my original thread was archived and thus could not update it with this info. Anyway, the script is still perfectly functional in build 2019.3480 in case anyone needs to know. Link to original thread here:

https://forums.coronalabs.com/topic/72134-android-app-title-localization-script/

Hi,

Thanks for making this script. It’s really useful to update values-xx folders for localization support.

Today, I ran the script with a 64-bit build from Corona 2019.3517. I saw some errors, and could not repack the APK successfully.

Hope you can help.

Ben

S: WARNING: Could not write to (C:\Users\Benjamin Chong\AppData\Local\apktool\framework), using C:\Users\BENJAM~1\AppData\Local\Temp\ instead... S: Please be aware this is a volatile directory and frameworks could go missing, please utilize --frame-path if the default storage directory is unavailable W: C:\Users\Benjamin Chong\OneDrive\Desktop\Localization Script\LeveLisa\AndroidManifest.xml:1: error: No resource identifier found for attribute 'compileSdkVersion' in package 'android' W: W: C:\Users\Benjamin Chong\OneDrive\Desktop\Localization Script\LeveLisa\AndroidManifest.xml:1: error: No resource identifier found for attribute 'compileSdkVersionCodename' in package 'android' W: Exception in thread "main" W: C:\Users\Benjamin Chong\OneDrive\Desktop\Localization Script\LeveLisa\AndroidManifest.xml:31: error: No resource identifier found for attribute 'appComponentFactory' in package 'android' W: brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\BENJAM~1\AppData\Local\Temp\brut\_util\_Jar\_4245116264477143791.tmp, p, --forced-package-id, 127, --min-sdk-version, 15, --target-sdk-version, 28, --version-code, 15, --version-name, 0.1.5, --no-version-vectors, -F, C:\Users\BENJAM~1\AppData\Local\Temp\APKTOOL6483549912492714627.tmp, -0, arsc, -0, META-INF/android.arch.core\_runtime.version, -0, META-INF/android.arch.lifecycle\_livedata-core.version, -0, META-INF/android.arch.lifecycle\_livedata.version, -0, META-INF/android.arch.lifecycle\_runtime.version, -0, META-INF/android.arch.lifecycle\_viewmodel.version, -0, META-INF/androidx.appcompat\_appcompat.version, -0, META-INF/androidx.asynclayoutinflater\_asynclayoutinflater.version, -0, META-INF/androidx.coordinatorlayout\_coordinatorlayout.version, -0, META-INF/androidx.core\_core.version, -0, META-INF/androidx.cursoradapter\_cursoradapter.version, -0, META-INF/androidx.customview\_customview.version, -0, META-INF/androidx.documentfile\_documentfile.version, -0, META-INF/androidx.drawerlayout\_drawerlayout.version, -0, META-INF/androidx.fragment\_fragment.version, -0, META-INF/androidx.interpolator\_interpolator.version, -0, META-INF/androidx.legacy\_legacy-support-core-ui.version, -0, META-INF/androidx.legacy\_legacy-support-core-utils.version, -0, META-INF/androidx.legacy\_legacy-support-v4.version, -0, META-INF/androidx.loader\_loader.version, -0, META-INF/androidx.localbroadcastmanager\_localbroadcastmanager.version, -0, META-INF/androidx.media\_media.version, -0, META-INF/androidx.print\_print.version, -0, META-INF/androidx.recyclerview\_recyclerview.version, -0, META-INF/androidx.slidingpanelayout\_slidingpanelayout.version, -0, META-INF/androidx.swiperefreshlayout\_swiperefreshlayout.version, -0, META-INF/androidx.vectordrawable\_vectordrawable-animated.version, -0, META-INF/androidx.vectordrawable\_vectordrawable.version, -0, META-INF/androidx.versionedparcelable\_versionedparcelable.version, -0, META-INF/androidx.viewpager\_viewpager.version, -0, arsc, -I, C:\Users\BENJAM~1\AppData\Local\Temp\1.apk, -S, C:\Users\Benjamin Chong\OneDrive\Desktop\Localization Script\LeveLisa\res, -M, C:\Users\Benjamin Chong\OneDrive\Desktop\Localization Script\LeveLisa\AndroidManifest.xml] at brut.androlib.Androlib.buildResourcesFull(Androlib.java:485) at brut.androlib.Androlib.buildResources(Androlib.java:419) at brut.androlib.Androlib.build(Androlib.java:318) at brut.androlib.Androlib.build(Androlib.java:270) at brut.apktool.Main.cmdBuild(Main.java:224) at brut.apktool.Main.main(Main.java:75) Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\BENJAM~1\AppData\Local\Temp\brut\_util\_Jar\_4245116264477143791.tmp, p, --forced-package-id, 127, --min-sdk-version, 15, --target-sdk-version, 28, --version-code, 15, --version-name, 0.1.5, --no-version-vectors, -F, C:\Users\BENJAM~1\AppData\Local\Temp\APKTOOL6483549912492714627.tmp, -0, arsc, -0, META-INF/android.arch.core\_runtime.version, -0, META-INF/android.arch.lifecycle\_livedata-core.version, -0, META-INF/android.arch.lifecycle\_livedata.version, -0, META-INF/android.arch.lifecycle\_runtime.version, -0, META-INF/android.arch.lifecycle\_viewmodel.version, -0, META-INF/androidx.appcompat\_appcompat.version, -0, META-INF/androidx.asynclayoutinflater\_asynclayoutinflater.version, -0, META-INF/androidx.coordinatorlayout\_coordinatorlayout.version, -0, META-INF/androidx.core\_core.version, -0, META-INF/androidx.cursoradapter\_cursoradapter.version, -0, META-INF/androidx.customview\_customview.version, -0, META-INF/androidx.documentfile\_documentfile.version, -0, META-INF/androidx.drawerlayout\_drawerlayout.version, -0, META-INF/androidx.fragment\_fragment.version, -0, META-INF/androidx.interpolator\_interpolator.version, -0, META-INF/androidx.legacy\_legacy-support-core-ui.version, -0, META-INF/androidx.legacy\_legacy-support-core-utils.version, -0, META-INF/androidx.legacy\_legacy-support-v4.version, -0, META-INF/androidx.loader\_loader.version, -0, META-INF/androidx.localbroadcastmanager\_localbroadcastmanager.version, -0, META-INF/androidx.media\_media.version, -0, META-INF/androidx.print\_print.version, -0, META-INF/androidx.recyclerview\_recyclerview.version, -0, META-INF/androidx.slidingpanelayout\_slidingpanelayout.version, -0, META-INF/androidx.swiperefreshlayout\_swiperefreshlayout.version, -0, META-INF/androidx.vectordrawable\_vectordrawable-animated.version, -0, META-INF/androidx.vectordrawable\_vectordrawable.version, -0, META-INF/androidx.versionedparcelable\_versionedparcelable.version, -0, META-INF/androidx.viewpager\_viewpager.version, -0, arsc, -I, C:\Users\BENJAM~1\AppData\Local\Temp\1.apk, -S, C:\Users\Benjamin Chong\OneDrive\Desktop\Localization Script\LeveLisa\res, -M, C:\Users\Benjamin Chong\OneDrive\Desktop\Localization Script\LeveLisa\AndroidManifest.xml] at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:454) at brut.androlib.Androlib.buildResourcesFull(Androlib.java:471) ... 5 more Caused by: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\BENJAM~1\AppData\Local\Temp\brut\_util\_Jar\_4245116264477143791.tmp, p, --forced-package-id, 127, --min-sdk-version, 15, --target-sdk-version, 28, --version-code, 15, --version-name, 0.1.5, --no-version-vectors, -F, C:\Users\BENJAM~1\AppData\Local\Temp\APKTOOL6483549912492714627.tmp, -0, arsc, -0, META-INF/android.arch.core\_runtime.version, -0, META-INF/android.arch.lifecycle\_livedata-core.version, -0, META-INF/android.arch.lifecycle\_livedata.version, -0, META-INF/android.arch.lifecycle\_runtime.version, -0, META-INF/android.arch.lifecycle\_viewmodel.version, -0, META-INF/androidx.appcompat\_appcompat.version, -0, META-INF/androidx.asynclayoutinflater\_asynclayoutinflater.version, -0, META-INF/androidx.coordinatorlayout\_coordinatorlayout.version, -0, META-INF/androidx.core\_core.version, -0, META-INF/androidx.cursoradapter\_cursoradapter.version, -0, META-INF/androidx.customview\_customview.version, -0, META-INF/androidx.documentfile\_documentfile.version, -0, META-INF/androidx.drawerlayout\_drawerlayout.version, -0, META-INF/androidx.fragment\_fragment.version, -0, META-INF/androidx.interpolator\_interpolator.version, -0, META-INF/androidx.legacy\_legacy-support-core-ui.version, -0, META-INF/androidx.legacy\_legacy-support-core-utils.version, -0, META-INF/androidx.legacy\_legacy-support-v4.version, -0, META-INF/androidx.loader\_loader.version, -0, META-INF/androidx.localbroadcastmanager\_localbroadcastmanager.version, -0, META-INF/androidx.media\_media.version, -0, META-INF/androidx.print\_print.version, -0, META-INF/androidx.recyclerview\_recyclerview.version, -0, META-INF/androidx.slidingpanelayout\_slidingpanelayout.version, -0, META-INF/androidx.swiperefreshlayout\_swiperefreshlayout.version, -0, META-INF/androidx.vectordrawable\_vectordrawable-animated.version, -0, META-INF/androidx.vectordrawable\_vectordrawable.version, -0, META-INF/androidx.versionedparcelable\_versionedparcelable.version, -0, META-INF/androidx.viewpager\_viewpager.version, -0, arsc, -I, C:\Users\BENJAM~1\AppData\Local\Temp\1.apk, -S, C:\Users\Benjamin Chong\OneDrive\Desktop\Localization Script\LeveLisa\res, -M, C:\Users\Benjamin Chong\OneDrive\Desktop\Localization Script\LeveLisa\AndroidManifest.xml] at brut.util.OS.exec(OS.java:95) at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:448) ... 6 more

Is this the first time you’ve tried the script with a 64 bit build? Were you able to use the script successfully in the past with 32 bit builds? Are you using JDK 9.0.4?

Yes, I have been successfully using your script to add localized apptitles with 32-bit builds.

This is the first time I am running the script on a 64-bit build. I’ve also recently updated JDK, as part of the requirements to make 64-bit builds. This is what I have on my machines:

openjdk version “1.8.0_222”
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_222-b10)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.222-b10, mixed mode)

Does the script only work with version 9.0.4?

Ben

Hi,

Thanks for making this script. It’s really useful to update values-xx folders for localization support.

Today, I ran the script with a 64-bit build from Corona 2019.3517. I saw some errors, and could not repack the APK successfully.

Hope you can help.

Ben

S: WARNING: Could not write to (C:\Users\Benjamin Chong\AppData\Local\apktool\framework), using C:\Users\BENJAM~1\AppData\Local\Temp\ instead... S: Please be aware this is a volatile directory and frameworks could go missing, please utilize --frame-path if the default storage directory is unavailable W: C:\Users\Benjamin Chong\OneDrive\Desktop\Localization Script\LeveLisa\AndroidManifest.xml:1: error: No resource identifier found for attribute 'compileSdkVersion' in package 'android' W: W: C:\Users\Benjamin Chong\OneDrive\Desktop\Localization Script\LeveLisa\AndroidManifest.xml:1: error: No resource identifier found for attribute 'compileSdkVersionCodename' in package 'android' W: Exception in thread "main" W: C:\Users\Benjamin Chong\OneDrive\Desktop\Localization Script\LeveLisa\AndroidManifest.xml:31: error: No resource identifier found for attribute 'appComponentFactory' in package 'android' W: brut.androlib.AndrolibException: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\BENJAM~1\AppData\Local\Temp\brut\_util\_Jar\_4245116264477143791.tmp, p, --forced-package-id, 127, --min-sdk-version, 15, --target-sdk-version, 28, --version-code, 15, --version-name, 0.1.5, --no-version-vectors, -F, C:\Users\BENJAM~1\AppData\Local\Temp\APKTOOL6483549912492714627.tmp, -0, arsc, -0, META-INF/android.arch.core\_runtime.version, -0, META-INF/android.arch.lifecycle\_livedata-core.version, -0, META-INF/android.arch.lifecycle\_livedata.version, -0, META-INF/android.arch.lifecycle\_runtime.version, -0, META-INF/android.arch.lifecycle\_viewmodel.version, -0, META-INF/androidx.appcompat\_appcompat.version, -0, META-INF/androidx.asynclayoutinflater\_asynclayoutinflater.version, -0, META-INF/androidx.coordinatorlayout\_coordinatorlayout.version, -0, META-INF/androidx.core\_core.version, -0, META-INF/androidx.cursoradapter\_cursoradapter.version, -0, META-INF/androidx.customview\_customview.version, -0, META-INF/androidx.documentfile\_documentfile.version, -0, META-INF/androidx.drawerlayout\_drawerlayout.version, -0, META-INF/androidx.fragment\_fragment.version, -0, META-INF/androidx.interpolator\_interpolator.version, -0, META-INF/androidx.legacy\_legacy-support-core-ui.version, -0, META-INF/androidx.legacy\_legacy-support-core-utils.version, -0, META-INF/androidx.legacy\_legacy-support-v4.version, -0, META-INF/androidx.loader\_loader.version, -0, META-INF/androidx.localbroadcastmanager\_localbroadcastmanager.version, -0, META-INF/androidx.media\_media.version, -0, META-INF/androidx.print\_print.version, -0, META-INF/androidx.recyclerview\_recyclerview.version, -0, META-INF/androidx.slidingpanelayout\_slidingpanelayout.version, -0, META-INF/androidx.swiperefreshlayout\_swiperefreshlayout.version, -0, META-INF/androidx.vectordrawable\_vectordrawable-animated.version, -0, META-INF/androidx.vectordrawable\_vectordrawable.version, -0, META-INF/androidx.versionedparcelable\_versionedparcelable.version, -0, META-INF/androidx.viewpager\_viewpager.version, -0, arsc, -I, C:\Users\BENJAM~1\AppData\Local\Temp\1.apk, -S, C:\Users\Benjamin Chong\OneDrive\Desktop\Localization Script\LeveLisa\res, -M, C:\Users\Benjamin Chong\OneDrive\Desktop\Localization Script\LeveLisa\AndroidManifest.xml] at brut.androlib.Androlib.buildResourcesFull(Androlib.java:485) at brut.androlib.Androlib.buildResources(Androlib.java:419) at brut.androlib.Androlib.build(Androlib.java:318) at brut.androlib.Androlib.build(Androlib.java:270) at brut.apktool.Main.cmdBuild(Main.java:224) at brut.apktool.Main.main(Main.java:75) Caused by: brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\BENJAM~1\AppData\Local\Temp\brut\_util\_Jar\_4245116264477143791.tmp, p, --forced-package-id, 127, --min-sdk-version, 15, --target-sdk-version, 28, --version-code, 15, --version-name, 0.1.5, --no-version-vectors, -F, C:\Users\BENJAM~1\AppData\Local\Temp\APKTOOL6483549912492714627.tmp, -0, arsc, -0, META-INF/android.arch.core\_runtime.version, -0, META-INF/android.arch.lifecycle\_livedata-core.version, -0, META-INF/android.arch.lifecycle\_livedata.version, -0, META-INF/android.arch.lifecycle\_runtime.version, -0, META-INF/android.arch.lifecycle\_viewmodel.version, -0, META-INF/androidx.appcompat\_appcompat.version, -0, META-INF/androidx.asynclayoutinflater\_asynclayoutinflater.version, -0, META-INF/androidx.coordinatorlayout\_coordinatorlayout.version, -0, META-INF/androidx.core\_core.version, -0, META-INF/androidx.cursoradapter\_cursoradapter.version, -0, META-INF/androidx.customview\_customview.version, -0, META-INF/androidx.documentfile\_documentfile.version, -0, META-INF/androidx.drawerlayout\_drawerlayout.version, -0, META-INF/androidx.fragment\_fragment.version, -0, META-INF/androidx.interpolator\_interpolator.version, -0, META-INF/androidx.legacy\_legacy-support-core-ui.version, -0, META-INF/androidx.legacy\_legacy-support-core-utils.version, -0, META-INF/androidx.legacy\_legacy-support-v4.version, -0, META-INF/androidx.loader\_loader.version, -0, META-INF/androidx.localbroadcastmanager\_localbroadcastmanager.version, -0, META-INF/androidx.media\_media.version, -0, META-INF/androidx.print\_print.version, -0, META-INF/androidx.recyclerview\_recyclerview.version, -0, META-INF/androidx.slidingpanelayout\_slidingpanelayout.version, -0, META-INF/androidx.swiperefreshlayout\_swiperefreshlayout.version, -0, META-INF/androidx.vectordrawable\_vectordrawable-animated.version, -0, META-INF/androidx.vectordrawable\_vectordrawable.version, -0, META-INF/androidx.versionedparcelable\_versionedparcelable.version, -0, META-INF/androidx.viewpager\_viewpager.version, -0, arsc, -I, C:\Users\BENJAM~1\AppData\Local\Temp\1.apk, -S, C:\Users\Benjamin Chong\OneDrive\Desktop\Localization Script\LeveLisa\res, -M, C:\Users\Benjamin Chong\OneDrive\Desktop\Localization Script\LeveLisa\AndroidManifest.xml] at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:454) at brut.androlib.Androlib.buildResourcesFull(Androlib.java:471) ... 5 more Caused by: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\BENJAM~1\AppData\Local\Temp\brut\_util\_Jar\_4245116264477143791.tmp, p, --forced-package-id, 127, --min-sdk-version, 15, --target-sdk-version, 28, --version-code, 15, --version-name, 0.1.5, --no-version-vectors, -F, C:\Users\BENJAM~1\AppData\Local\Temp\APKTOOL6483549912492714627.tmp, -0, arsc, -0, META-INF/android.arch.core\_runtime.version, -0, META-INF/android.arch.lifecycle\_livedata-core.version, -0, META-INF/android.arch.lifecycle\_livedata.version, -0, META-INF/android.arch.lifecycle\_runtime.version, -0, META-INF/android.arch.lifecycle\_viewmodel.version, -0, META-INF/androidx.appcompat\_appcompat.version, -0, META-INF/androidx.asynclayoutinflater\_asynclayoutinflater.version, -0, META-INF/androidx.coordinatorlayout\_coordinatorlayout.version, -0, META-INF/androidx.core\_core.version, -0, META-INF/androidx.cursoradapter\_cursoradapter.version, -0, META-INF/androidx.customview\_customview.version, -0, META-INF/androidx.documentfile\_documentfile.version, -0, META-INF/androidx.drawerlayout\_drawerlayout.version, -0, META-INF/androidx.fragment\_fragment.version, -0, META-INF/androidx.interpolator\_interpolator.version, -0, META-INF/androidx.legacy\_legacy-support-core-ui.version, -0, META-INF/androidx.legacy\_legacy-support-core-utils.version, -0, META-INF/androidx.legacy\_legacy-support-v4.version, -0, META-INF/androidx.loader\_loader.version, -0, META-INF/androidx.localbroadcastmanager\_localbroadcastmanager.version, -0, META-INF/androidx.media\_media.version, -0, META-INF/androidx.print\_print.version, -0, META-INF/androidx.recyclerview\_recyclerview.version, -0, META-INF/androidx.slidingpanelayout\_slidingpanelayout.version, -0, META-INF/androidx.swiperefreshlayout\_swiperefreshlayout.version, -0, META-INF/androidx.vectordrawable\_vectordrawable-animated.version, -0, META-INF/androidx.vectordrawable\_vectordrawable.version, -0, META-INF/androidx.versionedparcelable\_versionedparcelable.version, -0, META-INF/androidx.viewpager\_viewpager.version, -0, arsc, -I, C:\Users\BENJAM~1\AppData\Local\Temp\1.apk, -S, C:\Users\Benjamin Chong\OneDrive\Desktop\Localization Script\LeveLisa\res, -M, C:\Users\Benjamin Chong\OneDrive\Desktop\Localization Script\LeveLisa\AndroidManifest.xml] at brut.util.OS.exec(OS.java:95) at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:448) ... 6 more

Is this the first time you’ve tried the script with a 64 bit build? Were you able to use the script successfully in the past with 32 bit builds? Are you using JDK 9.0.4?

Yes, I have been successfully using your script to add localized apptitles with 32-bit builds.

This is the first time I am running the script on a 64-bit build. I’ve also recently updated JDK, as part of the requirements to make 64-bit builds. This is what I have on my machines:

openjdk version “1.8.0_222”
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_222-b10)
OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.222-b10, mixed mode)

Does the script only work with version 9.0.4?

Ben

Hi @gamebit.labs, sorry, I never saw your response. Using the latest version of apktool (2.4.1) solves this problem, if you haven’t already figured that out yourself in the meantime! When I have a moment, I’ll update my zip on the original post.