I am running the command:
admins-MacBook-Pro:launcher devrath$ ./gradlew assemblerelease
I get the. error as:
> Task :app:compileGalileoReleaseJavaWithJavac FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileGalileoReleaseJavaWithJavac'.
> javax/xml/bind/JAXBException
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1s
22 actionable tasks: 1 executed, 21 up-to-date
I already added These dependencies:
implementation "org.glassfish.jaxb:jaxb-runtime:2.3.2"
implementation "jakarta.xml.bind:jakarta.xml.bind-api:2.3.2"
I am using :
admins-MacBook-Pro:~ devrath$ javac -version
javac 13.0.2
I resolved using below lines in grade
if (JavaVersion.current().ordinal() >= JavaVersion.VERSION_1_9.ordinal()) {
// If you're using #AutoValue or any libs that requires javax.annotation (like Dagger)
compileOnly 'com.github.pengrad:jdk9-deps:1.0'
compileOnly 'javax.annotation:javax.annotation-api:1.3.2'
// If you're using Java
annotationProcessor "com.sun.xml.bind:jaxb-core:2.3.0.1"
annotationProcessor "javax.xml.bind:jaxb-api:2.3.1"
annotationProcessor 'com.sun.xml.bind:jaxb-impl:2.3.2'
testAnnotationProcessor "com.sun.xml.bind:jaxb-core:2.3.0.1"
testAnnotationProcessor "javax.xml.bind:jaxb-api:2.3.1"
implementation "javax.annotation:jsr250-api:1.0"
// If you're using Kotlin
if (project.hasProperty('kapt')) {
kapt 'javax.xml.bind:jaxb-api:2.3.1'
kapt 'com.sun.xml.bind:jaxb-core:2.3.0.1'
kapt 'com.sun.xml.bind:jaxb-impl:2.3.2'
}
}
Related
Previously the app was working without any errors. Suddenly it started throwing errors when trying to compile and run the app through Android Studio.
Dependencies:
def retrofit_version = '2.9.0'
def room_version = "2.3.0"
def navigation_component = "2.3.5"
//Room
implementation "androidx.room:room-runtime:$room_version"
kapt "androidx.room:room-compiler:$room_version"
implementation "androidx.room:room-ktx:$room_version"
//Navigation component
implementation "androidx.navigation:navigation-runtime-ktx:$navigation_component"
implementation "androidx.navigation:navigation-fragment-ktx:$navigation_component"
// ViewModel and LiveData
implementation "android.arch.lifecycle:extensions:1.1.1"
// Firebase
implementation platform('com.google.firebase:firebase-bom:30.2.0')
implementation 'com.google.firebase:firebase-crashlytics'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
Error:
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':module_name:mergeDebugResources'.
> Could not resolve all task dependencies for configuration ':module_name:debugRuntimeClasspath'.
> Could not resolve androidx.room:room-common:[2.3.0].
Required by:
project :module_name > androidx.room:room-runtime:2.3.0
project :module_name > androidx.room:room-ktx:2.3.0
> Failed to list versions for androidx.room:room-common.
> Could not list versions using M2 pattern 'https://jcenter.bintray.com/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier])(.[ext])'.
> Could not get resource 'https://jcenter.bintray.com/androidx/room/room-common/'.
> Could not GET 'https://jcenter.bintray.com/androidx/room/room-common/'.
> Read timed out
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1m 28s
JCenter is actually down.
You can check the status here : JCenter downtime impact on resolution
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed soon. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: The specified Android SDK Build Tools version (23.0.1) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.5.2.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '23.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
Task :app:processDebugResources FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.9/userguide/command_line_interface.html#sec:command_line_warnings
234 actionable tasks: 14 executed, 220 up-to-date
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:processDebugResources'.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
Android resource linking failed
C:\coding\App\storyqube-frontend\android\app\src\main\AndroidManifest.xml:13:5-71:19: AAPT: error: resource mipmap/storyqube (aka com.storyqube:mipmap/storyqube) not found.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 18s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:processDebugResources'.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
Android resource linking failed
C:\coding\App\storyqube-frontend\android\app\src\main\AndroidManifest.xml:13:5-71:19: AAPT: error: resource mipmap/storyqube (aka com.storyqube:mipmap/storyqube) not found.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 18s
at makeError (C:\coding\App\storyqube-frontend\node_modules\execa\index.js:174:9)
at C:\coding\App\storyqube-frontend\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (C:\coding\App\storyqube-frontend\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:5)
at async Command.handleAction (C:\coding\App\storyqube-frontend\node_modules\react-native\node_modules\#react-native-community\cli\build\index.js:186:9)
PS C:\coding\App\storyqube-frontend>
Check your build.gradle files in your android folder and search for compile and replace it it with implementation.
Change:
dependencies {
compile fileTree(dir: "libs", include: ["*.jar"])
compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.react:react-native:+" // From node_modules
compile project(':react-native-sqlite-storage')
}
To:
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:23.0.1"
implementation "com.facebook.react:react-native:+" // From node_modules
implementation project(':react-native-sqlite-storage')
}
I want to use ConstraintLayout recently. But it seems to be more complicated than I can imagine. When I add the dependency, compile error comes as below:
Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details
When I execute gradlew assemble, I get this:
AGPBI: {"kind":"error","text":"error: duplicate value for resource \u0027attr/content\u0027 with config \u0027\u0027.","sources":[{"file":"D:\\Cache\\.gradle\\caches\\transforms-1\\files-1.1\\appcompat-v7-27.1.1.aar\\b4523fa2ae32c684fd710140c71c62d6\\res\\values\\values.xml","position":{"startLine":250,"startColumn":4,"startOffset":27058,"endColumn":68,"endOffset":27122}}],"original":"","tool":"AAPT"}
AGPBI: {"kind":"error","text":"error: resource previously defined here.","sources":[{"file":"D:\\Cache\\.gradle\\caches\\transforms-1\\files-1.1\\appcompat-v7-27.1.1.aar\\b4523fa2ae32c684fd710140c71c62d6\\res\\values\\values.xml","position":{"startLine":250,"startColumn":4,"startOffset":27058,"endColumn":68,"endOffset":27122}}],"original":"","tool":"AAPT"}
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Error: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 7s
Here is my build.gradle file:
...
repositories {
google()
}
...
dependencies {
def app = rootProject.ext.android
// android support
implementation "com.android.support:appcompat-v7:27.1.1"
implementation "com.android.support:design:27.1.1"
implementation "com.android.support:palette-v7:27.1.1"
implementation "com.android.support:recyclerview-v7:27.1.1"
implementation "com.android.support:cardview-v7:27.1.1"
implementation "com.android.support:percent:27.1.1"
implementation "com.android.support:support-v4:27.1.1"
implementation "com.android.support:gridlayout-v7:27.1.1"
implementation "com.android.support:support-vector-drawable:27.1.1"
implementation 'com.android.support:multidex:1.0.3'
implementation 'junit:junit:4.12'
implementation "android.arch.lifecycle:extensions:1.1.1"
...
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
}
I had tried to clean, rebuild, invalidate and restart. They didn't work. And I also tried to update gradle plugin. But I saw more errors. Somebody help me please! It has bothered me for a couple of days.
PS, Information you may need:
Windows 7
android studio 3.3.2
gradle 3.1.4
java 8
i have this problem when running my flutter app
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:preDebugBuild'.
> Android dependency 'com.android.support:support-v4' has different
version for the compile (26.1.0) and runtime (27.1.1) classpath. You
should manually set the same version via DependencyResolution
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or
--debug option to get more log output. Run with --scan to get full
insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 0s
and i tried to solve it by adding
subprojects {
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.android.support'
&& !details.requested.name.contains('multidex') ) {
details.useVersion "26.1.0"
}
}
}
}
but it doesn't work
Finished with error: Gradle task assembleDebug failed with exit code 1
Android dependency 'com.android.support:support-v4' has different
version for the compile (26.1.0) and runtime (27.1.1) classpath. So you have to update to be in the same version.
I suddenly experience build failure with TRAVIS CI builds. But build succeeded with my local project. And the code has never been changed.
The link below shows error. {"errors": [{"status": 404,"message": "Could not find resource"}]}
:library:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug UP-TO-DATE
:myapp:dataBindingExportBuildInfoDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong: Could not resolve all files for configuration
':hwahae:debugCompileClasspath'.
> Could not find firebase-core.jar
(com.google.firebase:firebase-core:12.0.1).
Searched in the following locations:
https://jcenter.bintray.com/com/google/firebase/firebase-core/12.0.1/firebase-core-12.0.1.jar
> Could not find play-services-ads.jar
(com.google.android.gms:play-services-ads:12.0.1).
Searched in the following locations:
https://jcenter.bintray.com/com/google/android/gms/play-services-ads/12.0.1/play-services-ads-12.0.1.jar
> Could not find play-services-auth.jar
(com.google.android.gms:play-services-auth:12.0.1). Searched in the
following locations:
https://jcenter.bintray.com/com/google/android/gms/play-services-auth/12.0.1/play-services-auth-12.0.1.jar
* Try:
Run with --stacktrace option to get the stack trace. Run with --info
or --debug option to get more log output. Run with --scan to get full
insights.
* Get more help at https://help.gradle.org BUILD FAILED in 29s 64
actionable tasks: 16 executed, 48 up-to-date
myapp.gradle
dependencies {
def firebase_version 12.0.1
implementation "com.google.firebase:firebase-core:$firebase_version"
implementation "com.google.firebase:firebase-invites:$firebase_version"
implementation "com.google.firebase:firebase-config:$firebase_version"
def google_service_version = '12.0.1'
implementation "com.google.android.gms:play-services-gcm:$google_service_version"
implementation "com.google.android.gms:play-services-analytics:$google_service_version"
implementation "com.google.android.gms:play-services-ads:$google_service_version"
implementation "com.google.android.gms:play-services-auth:$google_service_version"
}