Android Wear release build aapt error - android

I'm trying to build the release version of an app including an Android Wear app.
When running the assembleRelease task for the mobile app, I get the following error:
Error:Execution failed for task ':MusicAppMobile:handleReleaseMicroApk'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'D:\dev\tools\android-sdk\build-tools\23.0.2\aapt.exe'' finished with non-zero exit value 1
My build tools, plugins and libraries are up to date. I already tried a clean rebuild.
UPDATE: Other things I tried without success in build.gradle for mobile and wear:
minifyEnabled false
shrinkResources false

I finally found the full command causing the error running gradle assembleRelease --debug.
...aapt.exe dump badging ...wear-release.apk
And the full error message.
ERROR getting 'android:permission' attribute for service ... attribute is not a string value
I changed the service permission from a "#string/..." reference to the permission string constant. Now the build is successful. I guess the the string resource was removed in the release build process.

Related

sentry upload failure message in Android release APK(signed)?

Working on the react-native app with go-Lang, In the sentry plugin facing issue while generating the release APK file. But we can able generate debug APK through android studio.
Android studio error messages:
sentry reported an error: You do not have permission to perform this action. (http status: 403)
Process 'command 'node_modules/#sentry/cli/bin/sentry-cli'' finished with non-zero exit value 1
Task :app:bundleReleaseJsAndAssets_SentryUploadCleanUp SKIPPED
Skipping task ':app:bundleReleaseJsAndAssets_SentryUploadCleanUp' as task onlyIf is false.
:app:bundleReleaseJsAndAssets_SentryUploadCleanUp (Thread[Execution worker for ':' Thread 8,5,main]) completed. Took 0.0 secs.
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:bundleReleaseJsAndAssets_SentryUpload'.
java.lang.NullPointerException (no error message)
I tried blow steps are tired
Followed https://docs.sentry.io/platforms/react-native/advanced-setup/
I removed the line cli.executable=node_modules/#sentry/cli/bin/sentry-cli in android/sentry.properties
Modified logLevel: "debug/release"
Verified with enableHermes true/false
Which is source stoping us, any guidelines will help to proceed further.
Please be aware to the name of the project in your sentry.io site.
I changed my project name from "react-native" to "my-project", and i got this error.
so I went to this path:
android/sentry.properties
and i changed the line 3
defaults.project=react-native
to this:
defaults.project=my-project
and the error is gone!
I am sure it will help.

Trying to build Flutter app for distribution. Execution failed for task ':app:appDistributionUploadRelease'

I'm trying to build an apk to upload to Firebase App Distribution.
When I run ./gradlew assembleRelease appDistributionUploadRelease I get this error:
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:appDistributionUploadRelease'.
Missing app id. Please check that it was passed in and try again
The app ID is specified in [my project]/android/app/build.gradle.
How can I fix this error?
edit: I found that I can just upload the apk file manually to Firebase App Distribution but the warning said that I would need to fix the problem before I could use Codemagic.
I was found the same problem, I found that just add appId
firebaseAppDistribution {
appId="your app id"
releaseNotes="Release notes for full version"
testers="full#testers.com"
}
Read the document
https://firebase.google.com/docs/app-distribution/android/distribute-gradle#step_3_configure_your_distribution_properties

Could not download groovy-all.jar (org.codehaus.groovy:groovy-all:2.4.15) in Android Studio 3.3 Beta 2

The Problem:
when i am trying to build release variant of my Kotlin project in Android Studio 3.3 Beta 2, it is getting stuck randomly for 10 to 16 minutes after spitting some errors.
Running gradle/assemble it showed following errors :
> Task :app:lintVitalRelease FAILED
:app:lintVitalRelease (Thread[Task worker for ':' Thread 2,5,main]) completed. Took 8 mins 23.222 secs.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:lintVitalRelease'.
> Could not resolve all files for configuration ':app:lintClassPath'.
> Could not download groovy-all.jar (org.codehaus.groovy:groovy-all:2.4.15)
> Could not get resource 'https://jcenter.bintray.com/org/codehaus/groovy/groovy-all/2.4.15/groovy-all-2.4.15.jar'.
> Connection reset
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:lintVitalRelease'.
What I've tried so far
Answer from this question Could not find org.codehaus.groovy:groovy-all:2.4.12
but it isn't downloading at all and getting stuck.
tried to open the link in the browser and it is downloading the file but it is not downloading while in the build process https://jcenter.bintray.com/org/codehaus/groovy/groovy-all/2.4.15/groovy-all-2.4.15.jar
created a brand new project tried to release it same problem there
Project Gradle settings
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.0"
classpath 'com.android.tools.build:gradle:3.4.0-alpha02'
//workaround for Dagger2 > 2.16
classpath 'com.android.tools.build.jetifier:jetifier-processor:1.0.0-beta02'
i don't know what is causing it to stop downloading or not allowing it to download the groovy file but i am stuck here and can't release my app :(
when i updated my Android Studio to ver3.3 today ,i met this problem ,and here are my errors:
"Execution failed for task ':app:lintVitalRelease"....
"org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all artifacts for configuration ':app:debugAndroidTestRuntimeClasspath"
.....
"Could not download junit.jar (junit:junit:4.12)"
.....
"org.gradle.api.resources.ResourceException: Could not get resource 'https://jcenter.bintray.com/junit/junit/4.12/junit-4.12.jar'."
.....
"org.gradle.internal.resource.transport.http.HttpRequestException: Could not GET 'https://jcenter.bintray.com/junit/junit/4.12/junit-4.12.jar'"
.....
this time its 'junit.jar',and 30mins ago its 'groovy-all.jar'....ithink there are sth wrong with my internet,so i have tried many times and waited for hours...
but when i searched 'Execution failed for task ':app:lintVitalRelease' when i was waiting ,i found another solution,add the following lines to android{} in app\build.gradle
"lintOptions {
checkReleaseBuilds false
abortOnError false
}"
i dont know why,but it works,the red lines disappear...
I solved it by waiting for 30 minutes so it can download the groovy jar file, before trying it for 2 hours and it was no problem with my internet.
thanks #TheWanderer to hint me about the internet
Accepted answer is right, just one more thing. For me I was using VPN as I was connected to database via secure channel. Hence, when I was running android studio, it was failing at similar point. Once I turned off my vpn and ran again it worked like a charm...

Sudden appearence of debug/AndroidManifest, execution failed for task:app:processDebugResources

I recently connected my mobile device up to android studio in order to attempt a build on a real device, before this, everything was working fine. However, the debug manifest is now showing some strange issues.
For example, the android version code and version name is coming up red, as are the config changes and the theme.
The actual error is:
Error:Execution failed for task ':app:processDebugResources'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\bembe_000\AppData\Local\Android\sdk1\build-tools\23.0.0\aapt.exe'' finished with non-zero exit value 1

Gradle in Android Studio 0.44 can't find process on path to run in an Exec Type task

I used to have the following gradle build task:
task buildWebApp(type: Exec) {
executable = Os.isFamily(Os.FAMILY_WINDOWS) ? "grunt.cmd" : "grunt"
args = ["build"]
}
This would pick the appropriate grunt command and run it with the argument "build".
This worked without any kind of issue
I've just tried this in Android Studio 0.4, using Gradle 1.9 and it's no longer working. Instead I get the following error:
Execution failed for task ':BrowserPages:buildWebApp'.
A problem occurred starting process 'command 'grunt''
Normally at this point I would debug with gradlew, but running the following command, throws no errors:
$ ./gradlew buildWebApp
I've also tried running the full task list to still not find any problems.
The way this is executed is from my main build.gradle file with this dependency
copyWebApplication.dependsOn ':BrowserPages:buildWebApp'
Anyone have any ideas?
I've tried to run executable = "node" with arg = ["-v"] and get the same error where it can't find node. Node is globally accessible on my terminal, so I can only assume that the command is being run in a different environment to the terminal. There is the option for setting the environment but I can't find any examples of how it should be used.
Try using a fully-qualified path to the grunt executable. Perhaps something in the path has changed between Android Studio/Gradle/Android Plugin versions.

Categories

Resources