I need to generate app bundle, but the error say :
Execution failed for task ':app:processReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
> Android resource linking failed
C:\Users\fajri\AndroidStudioProjects\Assessment\app\build\intermediates\packaged_manifests\release\AndroidManifest.xml:36: error: resource mipmap/ic_launcher (aka com.si20b.assessment:mipmap/ic_launcher) not found.
C:\Users\fajri\AndroidStudioProjects\Assessment\app\build\intermediates\packaged_manifests\release\AndroidManifest.xml:36: error: resource mipmap/ic_launcher_round (aka com.si20b.assessment:mipmap/ic_launcher_round) not found.
error: failed processing manifest.
i already put my icon in my android project
when you create your image assets make sure you choose main mode.
Related
This is the other problem:
Execution failed for task ':app:mergeDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.ResourceCompilerRunnable
> Resource compilation failed (Failed to compile values resource file /Users/bungaallysah/AndroidStudioProjects/splashscreen/app/build/intermediates/incremental/debug/mergeDebugResources/merged.dir/values/values.xml. Cause: java.lang.IllegalStateException: Can not extract resource from com.android.aaptcompiler.ParsedResource#1c9d41e0.,Can not extract resource from com.android.aaptcompiler.ParsedResource#23f7a22d.). Check logs for more details.
I've tried to setup the gradle, but there's no problem with that.
Multiple task action failures occurred:
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource compilation failed
AAPT: D:\Flutter Projects\Areading-master\android\app\src\main\res\mipmap-hdpi\ic_launcher.png: error: failed to read PNG signature: file does not start with PNG signature.
D:\Flutter Projects\Areading-master\android\app\src\main\res\mipmap-hdpi\ic_launcher.png: error: file failed to compile.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource compilation failed
AAPT: D:\Flutter Projects\Areading-master\android\app\src\main\res\mipmap-xhdpi\ic_launcher.png: error: failed to read PNG signature: file does not start with PNG signature.
D:\Flutter Projects\Areading-master\android\app\src\main\res\mipmap-xhdpi\ic_launcher.png: error: file failed to compile.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource compilation failed
AAPT: D:\Flutter Projects\Areading-master\android\app\src\main\res\mipmap-xxhdpi\ic_launcher.png: error: failed to read PNG signature: file does not start with PNG signature.
D:\Flutter Projects\Areading-master\android\app\src\main\res\mipmap-xxhdpi\ic_launcher.png: error: file failed to compile.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource compilation failed
AAPT: D:\Flutter Projects\Areading-master\android\app\src\main\res\mipmap-xxxhdpi\ic_launcher.png: error: failed to read PNG signature: file does not start with PNG signature.
D:\Flutter Projects\Areading-master\android\app\src\main\res\mipmap-xxxhdpi\ic_launcher.png: error: file failed to compile.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource compilation failed
AAPT: D:\Flutter Projects\Areading-master\android\app\src\main\res\mipmap-mdpi\ic_launcher.png: error: failed to read PNG signature: file does not start with PNG signature.
D:\Flutter Projects\Areading-master\android\app\src\main\res\mipmap-mdpi\ic_launcher.png: error: file failed to compile.
This Error Happened when I try to build the project by this command flutter build apk --split-per-abi I don't know what is that about? please Help.
The builder optimizes the images in your app, in this case the png images. This is to reduce the size of the apk. It is unable to do so in your case. To run without optimization you can put the following in your build.gradle
android {
buildTypes {
release {
crunchPngs false // or true
}
}
}
I changed the .png file to .jpg in res/drawable and it worked for me
I want to use Clojure to create a library that I'll use in an Android project.
Experimenting with this, I've made an Uberjar from a test library in Leiningen.
Then I import it into my Android project.
But I'm getting this error :
AGPBI: {"kind":"error","text":"MethodHandle.invoke and MethodHandle.invokeExact are only supported starting with Android O (--min-api 26)","sources":[{}],"tool":"D8"}
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeExtDexDebug'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Failed to transform file 'mylib.jar' to match attributes {artifactType=android-dex, dexing-enable-desugaring=false, dexing-is-debuggable=true, dexing-min-sdk=23, org.gradle.usage=java-runtime-jars}
> Execution failed for DexingNoClasspathTransform: /media/phil/54AE4F563BCE86E8/DATA/new_dev_tree/small_experiments/clj-jar-for-android/TestAJar/app/libs/mylib.jar.
> Error while dexing.
> Failed to transform file 'mylib.jar' to match attributes {artifactType=android-dex, dexing-enable-desugaring=false, dexing-is-debuggable=true, dexing-min-sdk=23, org.gradle.usage=java-runtime-jars}
> Execution failed for DexingNoClasspathTransform: /media/phil/54AE4F563BCE86E8/DATA/new_dev_tree/small_experiments/clj-jar-for-android/TestAJar/app/libs/mylib.jar.
> Error while dexing.
What exactly is going wrong here? Is it about the Android version? Or the file path? Or something completely different?
I have been debugging for 3 days but still couldn't resolve it. It would make my day if anyone of you have some idea on the source of the problem and how I might fix it? forgive me I don't know any better ways to paste the error message.
Error log:
Cause 1: java.util.concurrent.ExecutionException:
com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource
compilation failed
/Users/lalthanpuiachhangte/.gradle/caches/transforms-2/files-2.1/fa74de4132a623c0b9e0baae873e9df0/res/values/values.xml:3:5-130:
AAPT: error: duplicate value for resource 'attr/type' with config ''.
/Users/lalthanpuiachhangte/.gradle/caches/transforms-2/files-2.1/fa74de4132a623c0b9e0baae873e9df0/res/values/values.xml:3:5-130:
AAPT: error: resource previously defined here.
I removed one of the library I used, and the problem was gone. I guess it was the library.
Updated to reflect Sonar-Runner
We have these projects configured:
We're using this sonar-project.properties file in the root of the folder containing our application source:
sonar.projectKey=Southern
sonar.projectName=Southern
sonar.projectVersion=1.0
sonar.sources=.
We run the sonar-runner command in the same folder in which the above properties file exists. We get the following error:
ERROR: Error during SonarQube Scanner execution
ERROR: Unable to load component class org.sonar.batch.report.ActiveRulesPublishe
r
ERROR: Caused by: Unable to load component interface org.sonar.api.batch.rule.Ac
tiveRules
ERROR: Caused by: Unable to load component class org.sonar.batch.rule.ModuleQPro
files
ERROR: Caused by: Error 500 on http://localhost:9000/api/qualityprofiles/search.
protobuf?projectKey=Southern
ERROR:
The SonarQube application and website are running and available.
Downloaded the sonar-runner.
Updated properties file: sonar-sources=src. Scans ran but hung with an error that the DB was locked.
Rebooted the machine and restarted SonarQube. Problem resolved. All scans run.