- What went wrong:
Execution failed for task ‘:flutter_barcode_scanner:verifyReleaseResources’.
A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action
Android resource linking failed
ERROR: C:Usersfismfsourcereposministry_financebuildflutter_barcode_scannerintermediatesmerged_resreleasevaluesvalues.xml:6135: AAPT: error: resource android:attr/lStar not found.
i did this but still not solved "android {
namespace "com.example.flutter_barcode_scanner" // Replace with the actual package name
compileSdkVersion 33
defaultConfig {
minSdkVersion 21
targetSdkVersion 33
}
}"
2
Answers
According to the package issue here: Issue link
You can try to do the following in your
android/build.gradle
As the package is outdated, please refer to the issue tabs of the related package.
I noticed an issue with the namespace declaration made by you:
If you still haven’t noticed it early, especially in production, you’ll have an issue with the deployed project and the patch update. So please, if you have a plugin that you want to use.
Here’s the documentation about this,
Source is from the official site of the Android Developer
So, I hope now you know what to do.
Moreover, it is better to use the terminal like this.
(in your IDE terminal)
Do this if you want to add a certain plugin (you want to add an extra feature in your app)
If you want to remove that plugin
It will automatically added or removed to/from your
pubspec.yaml
fileI recommend this approach because it is compatibility-safe (i.e., providing a version that is compatible with your current build), but of course, compatible only if your environment is compatible with the plugin you’re using (e.g., Flutter version, Java SDK version, Gradle version, Kotlin version, etc.)
You can ONLY manually add your plugin to your
pubspec.yaml
file if you know what you’re doing, but if you are new to the framework, I advice you to use the better one (i.e., using terminal command).It will save time and it will save you as well XD
However, if you are having confusion with the exception you’re dealing.
Please do this in your terminal:
For release info logs-checker
For debug info logs-checker
By following the aforementioned practices to identify the root cause, you can resolve it on your own. But if there’s still an unresolved issue or error, you can include it in your question.
I hope it helps!