Kiwix:Android.ui.preparing files/fr
I don't know which IDE or editor you use. May be it's an issue in that editor, but I don't see whay a warning ni the code editor or IDE would block anything on your dev project (which should not depend on the text editor or IDE you use for specific platforms that are not the same as the target platform (e.g. if you edit on Linux the app intended for Android; you could as welle edit it on Windows, or with other IDEs). The build process is independant of your editor.
And this is not blocking any VCS tool I know (CVS, SVN, Git, Mercurial,...), or any build process or compiler. In all cases the Unicode encoding is correct here (it may just be incorrect due to an internal transform in the editor, that can then not save a valid Unicode form).
The only cause I see is that there were four dots, and this editor is unable to choose or by pass the choice for its own suggestions (possibly conflicting between the two alternatives and then breaking the UTF-8 encoding with the wrong number of bytes expected). This looks most probably like a bug in your IDE version (apparently running in Ubuntu according to your snapshot). If the Ubuntu app is running the native app, you may try the version from Sanps or from Flatpak (they are generally more up to date with mroe revent versions, with additional fixes). Your "Jetbrains Studio" IDE is very uncommon for opensource development (due to its licensing). Most opensourced projects using IDEs on Linux use other free IDEs which have good support in cluding in their free version (MS VisualStudio Code is now common on Linux, and fully supported by Ubuntu itself, but Eclipse is supported since much longer time for Java/Android developement; IDEA/IntelliJ-based tools is recommanded only for their paid professional versions). If you use the free version of Jetbrain tools it may have limitations (I've never tried that version) and bugs some that may be very long to get fixed. And mya be this is not the editor itself, but other plugins you've installed on it, or missing devependencies or an incorrect environment in your installation (check your user locale, is it using "en.UTF-8" or just the default "en"? Have you installed the full linguistic support for your Linux host, including encoding coversion tools and libs?).
Have you tried to remove the extra dot in English, given that it's undesired?
As well, given these are "Lint warnings" in the generated report, which Lint tool does your build use? May be you've incorrectly setup the rules to use a too strict or incorrect mode (e.g. for targetting terminal applications for the console to be rendered with monospaced fonts, where in fact these are strings for a graphical UI that should not use monospaced fonts). Linters normally have configurable options: you may needto enable/disable some of them according to your real target (be careful with default sets of options). I have no idea how you generate these "reports" in your build process, and why these are "warnings" (normally non-blocking) but your build project is set up apparently to block on ALL warnings, even if they just give possible hints (applicable only to some project targets). Clearly the Android UI does not need these to be "fixed". Ellipsis characters are clearly encodingf in Unicode for compatiblity with terminal apps or old typewriters, or when in fact the target rendering will not be based on Unicode but converted to legacy 8-bit charsets.
Also according to the online docs of IntelliJ IDEA, the Linter offers you options to shut up these warnings: if you click on one of them, it should propose you several choices for each warning but there are also general options you can set on any file or group of files, e.g. with the Shift+F6 shortcut, or by clicking an icon in the message). That tool has really a lot of Linter rules because it targets many application types and environments, some of them having unusual compatiblity requirements (including obsolete ones): all Linter tools I've used on all projects need to have specific Lint messages shut off, i.e. either silently discarded or configured to use a lower severity level (if IntellIJ IEA supports it, you may need to cahnge that rule to send a "Info" severity instead of the "Warning" severity, if your build projects is configured to block even at the "warning" severity level, as if they were errors (such setting in build projects is very unusual, most opensourced projects won't compile without warnings to be emitted, for later analysis and possible fix, but not to block the construction). It's then normal that you get a "build report", but if the report onily contains such warnings and the build was completed, your build is in fact successful.
hi vardy thanks for your answer.
- I'm using the android studio.
- We are using android lint in our project.
- For CI it's failing on lint error because of this we can not merge the TW pr in our code.
- Yes the English version of string using 4 dots (I have made a PR to change the 4 dots with 3 dots), and android lint giving this error on IDE and also on CI. you can check on TW PR (https://github.com/kiwix/kiwix-android/pull/3144).
- I have made a PR to change the 4 dots into 3 dots (https://github.com/kiwix/kiwix-android/pull/3263) after merging the PR, can we change ... dots with ellipsis character as we change in English version.
please have a look on the both PR.
Thanks & Regards Mohit Mali
In fact, on https://github.com/kiwix/kiwix-android/actions/runs/4374247118/jobs/7653435788
I see that this is NOT that Linter warning (which is shown only in your IDE editor) that blocks your build.
You have a real error in the XML files with unsupported attributes. I see serious things like:
> Task :app:processDebugManifest package="org.kiwix.kiwixmobile" found in source AndroidManifest.xml: /home/runner/work/kiwix-android/kiwix-android/app/build/intermediates/merged_manifest/debug/AndroidManifest.xml. Setting the namespace via a source AndroidManifest.xml's package attribute is deprecated. Please instead set the namespace (or testNamespace) in the module's build.gradle file, as described here: https://developer.android.com/studio/build/configure-app-module#set-namespace This migration can be done automatically using the AGP Upgrade Assistant, please refer to https://developer.android.com/studio/build/agp-upgrade-assistant for more information. package="org.kiwix.kiwixmobile" found in source AndroidManifest.xml: /home/runner/work/kiwix-android/kiwix-android/app/build/intermediates/merged_manifest/debug/AndroidManifest.xml. Setting the namespace via a source AndroidManifest.xml's package attribute is deprecated. Please instead set the namespace (or testNamespace) in the module's build.gradle file, as described here: https://developer.android.com/studio/build/configure-app-module#set-namespace This migration can be done automatically using the AGP Upgrade Assistant, please refer to https://developer.android.com/studio/build/agp-upgrade-assistant for more information. package="org.kiwix.kiwixmobile" found in source AndroidManifest.xml: /home/runner/work/kiwix-android/kiwix-android/app/build/intermediates/merged_manifest/debug/AndroidManifest.xml. Setting the namespace via a source AndroidManifest.xml's package attribute is deprecated. Please instead set the namespace (or testNamespace) in the module's build.gradle file, as described here: https://developer.android.com/studio/build/configure-app-module#set-namespace This migration can be done automatically using the AGP Upgrade Assistant, please refer to https://developer.android.com/studio/build/agp-upgrade-assistant for more information. package="org.kiwix.kiwixmobile" found in source AndroidManifest.xml: /home/runner/work/kiwix-android/kiwix-android/app/build/intermediates/merged_manifest/debug/AndroidManifest.xml. Setting the namespace via a source AndroidManifest.xml's package attribute is deprecated. Please instead set the namespace (or testNamespace) in the module's build.gradle file, as described here: https://developer.android.com/studio/build/configure-app-module#set-namespace This migration can be done automatically using the AGP Upgrade Assistant, please refer to https://developer.android.com/studio/build/agp-upgrade-assistant for more information. [...snipped...] > Task :app:processDebugAndroidTestManifest package="org.kiwix.kiwixmobile" found in source AndroidManifest.xml: /home/runner/work/kiwix-android/kiwix-android/app/src/androidTest/AndroidManifest.xml. Setting the namespace via a source AndroidManifest.xml's package attribute is deprecated. Please instead set the namespace (or testNamespace) in the module's build.gradle file, as described here: https://developer.android.com/studio/build/configure-app-module#set-namespace This migration can be done automatically using the AGP Upgrade Assistant, please refer to https://developer.android.com/studio/build/agp-upgrade-assistant for more information. [...snipped...] > Task :custom:processCustomexampleDebugMainManifest package="org.kiwix.kiwixmobile.custom" found in source AndroidManifest.xml: /home/runner/work/kiwix-android/kiwix-android/custom/src/main/AndroidManifest.xml. Setting the namespace via a source AndroidManifest.xml's package attribute is deprecated. Please instead set the namespace (or testNamespace) in the module's build.gradle file, as described here: https://developer.android.com/studio/build/configure-app-module#set-namespace This migration can be done automatically using the AGP Upgrade Assistant, please refer to https://developer.android.com/studio/build/agp-upgrade-assistant for more information. > Task :custom:processCustomexampleDebugManifest package="org.kiwix.kiwixcustomcustomexample" found in source AndroidManifest.xml: /home/runner/work/kiwix-android/kiwix-android/custom/build/intermediates/merged_manifest/customexampleDebug/AndroidManifest.xml. Setting the namespace via a source AndroidManifest.xml's package attribute is deprecated. Please instead set the namespace (or testNamespace) in the module's build.gradle file, as described here: https://developer.android.com/studio/build/configure-app-module#set-namespace This migration can be done automatically using the AGP Upgrade Assistant, please refer to https://developer.android.com/studio/build/agp-upgrade-assistant for more information. package="org.kiwix.kiwixcustomcustomexample" found in source AndroidManifest.xml: /home/runner/work/kiwix-android/kiwix-android/custom/build/intermediates/merged_manifest/customexampleDebug/AndroidManifest.xml. Setting the namespace via a source AndroidManifest.xml's package attribute is deprecated. Please instead set the namespace (or testNamespace) in the module's build.gradle file, as described here: https://developer.android.com/studio/build/configure-app-module#set-namespace This migration can be done automatically using the AGP Upgrade Assistant, please refer to https://developer.android.com/studio/build/agp-upgrade-assistant for more information. package="org.kiwix.kiwixcustomcustomexample" found in source AndroidManifest.xml: /home/runner/work/kiwix-android/kiwix-android/custom/build/intermediates/merged_manifest/customexampleDebug/AndroidManifest.xml. Setting the namespace via a source AndroidManifest.xml's package attribute is deprecated. Please instead set the namespace (or testNamespace) in the module's build.gradle file, as described here: https://developer.android.com/studio/build/configure-app-module#set-namespace This migration can be done automatically using the AGP Upgrade Assistant, please refer to https://developer.android.com/studio/build/agp-upgrade-assistant for more information.
As well there are many other issues in the Java code itself, also listed in the report found in GitHub!
> Task :core:generateDebugLintModel butterknife.lint.LintRegistry in /home/runner/.gradle/caches/transforms-3/f7c28b3d38f993a93532a66f30e0cd1b/transformed/jetified-butterknife-runtime-10.2.3/jars/lint.jar does not specify a vendor; see IssueRegistry#vendor
Because of that earlier error, the linter check cannot run correctly within your build process. So you need to check and fix your build debug manifest, with correct settings for "Gradle" and for the "jetified-butterknife" tool dependancy (you may need to update its version 10.2.3 to a more recent and compatible one compatible with Gradle 8.0, or setup your manifest to use a lower version of Gradle). So you get that final fatal error:
FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:lintDebug'. > Lint found errors in the project; aborting build. Fix the issues identified by lint, or create a baseline to see only new errors: ``` Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0. android { lint { baseline = file("lint-baseline.xml") } }
Note that given that your project is built on GitHub, GitHub provides many wizards to update your project dependancies, using smart Code Quality Assurance tools. Some of these addnos on GitHub even propose you fixes for such issues and can speed up your work.
When you use a free (community-supported) version of your local IDEA Intellij client, you don't have the full integration of GitHub tools: your IDE does not check the actual source report which blocks your project build. You just have its own internal linter that parse individual files to suggest things. But even if you replace these warnings locally, it won't fix your build environment used in GitHub (that can detect much more important things, notably interms of security and code quality). Your debug build is simply not correctly configured.
Vardy Thanks for your reply.
>FAILURE: Build failed with an exception.
>* What went wrong:
>Execution failed for task ':app:lintDebug'.
> Lint found errors in the project; aborting build.
Fix the issues identified by lint, or create a baseline to see only new errors: ```
>Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0. > android { > lint { > baseline = file("lint-baseline.xml") > } > }
This suggestion always comes whenever lint is failing on something, it point us to make a lint-basline.xml file and suppress the lint on particular error.
>butterknife.lint.LintRegistry in /home/runner/.gradle/caches/transforms->3/f7c28b3d38f993a93532a66f30e0cd1b/transformed/jetified-butterknife-runtime->10.2.3/jars/lint.jar does not specify a vendor; see IssueRegistry#vendor
Good point we fix this asap.
and the above warnings is deprecation warning we are working on it to remove deprecated methods from our whole project.
Last time you point out the wrong translation in english string file. we had fixed it https://github.com/kiwix/kiwix-android/pull/3263 , now we can use ellipsis character instead of ... ?
Actually no: don't you see the message "Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0".
Such Lint warnings should NOT be treated as "errors".
You still need to fix the incompatibility because you use "deprecated" Gradle features. Gradle 8.0 defines more precise rules that can correctly manage the various levels of messages emitted by various Linter tools. May be you started with a version of Gradel that did not complain, but Gradle 8.0 has new requirements and cannot correctly guess what is a blocking error or an informative warning without configuration because the current configuration is too weak, and cannot differentiate different messages emitted by your linter tool, possibly because your Linter tool uses some ambiguous "generic" syntax (e.g. some regexp) from which the effective severity cannot be assessed automatically. The suggested "lint-baseline.xml" configuration allows you to manage such filters or regexps for more precise assessment. By default, the generic rule many treat many (possibly all) warning as errors, and this is bad behavior only because you've not configured it correctly as instructed by Gradle 8.0.
The following links may help you: