Git Issue: https://github.com/expo/eas-cli/issues/1137
I upgraded my expo project to expo 44.0.0 from expo 41.0.0. While building the project using the command eas build --profile development --platform android , it fails with the above errors. Building with expo expo build:android -t apk --release-channel dev works fine.
Error output
Task :app:checkDebugAarMetadata FAILED
[stderr] FAILURE: Build failed with an exception.
[stderr] * What went wrong:
[stderr] Execution failed for task ':app:checkDebugAarMetadata'.
[stderr] > Multiple task action failures occurred:
[stderr] > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
[stderr] > The minCompileSdk (31) specified in a
[stderr] dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
[stderr] is greater than this module's compileSdkVersion (android-30).
[stderr] Dependency: androidx.camera:camera-view:1.1.0-beta02.
[stderr] AAR metadata file: /home/expo/.gradle/caches/transforms-3/12d1024712f31229ca58ab0bd8d21333/transformed/jetified-camera-view-1.1.0-beta02/META-INF/com/android/build/gradle/aar-metadata.properties.
[stderr] > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
[stderr] > The minCompileSdk (31) specified in a
[stderr] dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
[stderr] is greater than this module's compileSdkVersion (android-30).
[stderr] Dependency: androidx.camera:camera-extensions:1.1.0-beta02.
[stderr] AAR metadata file: /home/expo/.gradle/caches/transforms-3/b2e353b2c9ab37ded94a57d84d9c945e/transformed/jetified-camera-extensions-1.1.0-beta02/META-INF/com/android/build/gradle/aar-metadata.properties.
[stderr] > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
[stderr] > The minCompileSdk (31) specified in a
[stderr] dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
[stderr] is greater than this module's compileSdkVersion (android-30).
[stderr] Dependency: androidx.camera:camera-camera2:1.1.0-beta02.
[stderr] AAR metadata file: /home/expo/.gradle/caches/transforms-3/2675a37f413249dd4d5209666654efc4/transformed/jetified-camera-camera2-1.1.0-beta02/META-INF/com/android/build/gradle/aar-metadata.properties.
[stderr] > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
[stderr] > The minCompileSdk (31) specified in a
[stderr] dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
[stderr] is greater than this module's compileSdkVersion (android-30).
[stderr] Dependency: androidx.camera:camera-lifecycle:1.1.0-beta02.
[stderr] AAR metadata file: /home/expo/.gradle/caches/transforms-3/afe4b84723f7135b1bdead4bacd36e0e/transformed/jetified-camera-lifecycle-1.1.0-beta02/META-INF/com/android/build/gradle/aar-metadata.properties.
[stderr] > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
[stderr] > The minCompileSdk (31) specified in a
[stderr] dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
[stderr] is greater than this module's compileSdkVersion (android-30).
[stderr] Dependency: androidx.camera:camera-video:1.1.0-beta02.
[stderr] AAR metadata file: /home/expo/.gradle/caches/transforms-3/94888a47c690a5797cfc0500a21eeb39/transformed/jetified-camera-video-1.1.0-beta02/META-INF/com/android/build/gradle/aar-metadata.properties.
[stderr] > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
[stderr] > The minCompileSdk (31) specified in a
[stderr] dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
[stderr] is greater than this module's compileSdkVersion (android-30).
[stderr] Dependency: androidx.camera:camera-core:1.1.0-beta02.
[stderr] AAR metadata file: /home/expo/.gradle/caches/transforms-3/1d9440d353cb849104352a1a0b312396/transformed/jetified-camera-core-1.1.0-beta02/META-INF/com/android/build/gradle/aar-metadata.properties.
[stderr] * Try:
[stderr] 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.
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 3m 6s
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
45 actionable tasks: 45 executed
Error: Gradle build failed with unknown error. Please see logs for the "Run gradlew" phase.
I've had this issue in one of my projects, I had to use ./gradlew build --warning-mode=all to check which deprecated features were giving me this issue, I believe I fixed it by upgrading one of the dependencies. You can also try to run cd android && ./gradlew clean to clean any cache ( sometimes this also may fix the issue)
I had this error too and it took me days before I could figure it out. I installed the latest version of java which as of now is jdk 17. Seems the support of this wasn't readily available yet since it was still new. I had to uninstall it and download java version 11 (jdk 11). I equally had issues finding somewhere to download it from without paying or registering. If you need to download this, check out azul
Edit:
Ensure to set it as your environment variable in your PC/mac. Control panel > system settings > system > advanced settings > environment variables > system variables > look for JAVA_HOME(or whatever you named yours) and change the path from your old installation folder to your new java 11 installation folder. You must exit from cmd or whatever terminal or version control you are using and restart it for it to get the new path. To check if the app has the new path, in your terminal, type echo %JAVA_HOME%. It should show you the new path of your java installation. Also check if the java version is set too by entering, java -version
Related
Configuration on demand is an incubating feature.
Task :app:checkDebugAarMetadata 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.7.1/userguide/command_line_interface.html#sec:command_line_warnings
43 actionable tasks: 2 executed, 41 up-to-date
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
The minCompileSdk (33) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-31).
Dependency: androidx.browser:browser:1.5.0-alpha01.
AAR metadata file: C:\Users\akshay.patel.gradle\caches\transforms-2\files-2.1\41677513f37fd3ff659f9e9ccebf1218\browser-1.5.0-alpha01\META-INF\com\android\build\gradle\aar-metadata.properties.
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 28s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8088
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
The minCompileSdk (33) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-31).
Dependency: androidx.browser:browser:1.5.0-alpha01.
AAR metadata file: C:\Users\akshay.patel.gradle\caches\transforms-2\files-2.1\41677513f37fd3ff659f9e9ccebf1218\browser-1.5.0-alpha01\META-INF\com\android\build\gradle\aar-metadata.properties.
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 28s
at makeError (D:\User\mobile\node_modules\execa\index.js:174:9)
at D:\User\mobile\node_modules\execa\index.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async runOnAllDevices (D:\\mobile\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (D:\User\mobile\node_modules\react-native\node_modules\#react-native-community\cli\build\index.js:142:9)
info Run CLI with --verbose flag for more details.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! xyz#0.0.1 dev-local: npx react-native run-android --port=8088
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the xyz#0.0.1 dev-local script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\akshay.patel\AppData\Roaming\npm-cache_logs\2022-11-03T08_05_27_690Z-debug.log
Yes I tried updating my build.gradle by
android {
compileSdk = "33"
defaultConfig {
targetSdk = "33"
}
}
but I still get the same error
please help Thanks in advance
I got the root cause of the above problem that androidx.browser so I have resolved this by adding the below code snippet in android/app/build.gradle file
configurations.all {
resolutionStrategy { force 'androidx.browser:browser:1.4.0' }
}
So, I'm using the command line and VScode. I'm just trying to get Flutter to run so I can try it out again, but I keep running into this error. I used it before a few months ago and now I'm trying to start a new app. Any ideas?
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> Multiple task action failures occurred:
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
> The minCompileSdk (31) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-30).
Dependency: androidx.window:window-java:1.0.0-beta04.
AAR metadata file: C:\Users\Iverson\.gradle\caches\transforms-2\files-2.1\625039eaad011f884ddd84f857a44b7f\jetified-window-java-1.0.0-beta04\META-INF\com\android\build\gradle\aar-metadata.properties.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
> The minCompileSdk (31) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-30).
Dependency: androidx.window:window:1.0.0-beta04.
AAR metadata file: C:\Users\Iverson\.gradle\caches\transforms-2\files-2.1\a78fdf90e4c1f8464b19895cfb365f3f\jetified-window-1.0.0-beta04\META-INF\com\android\build\gradle\aar-metadata.properties.
* 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 4s
Running Gradle task 'assembleDebug'... 5.2s
Exception: Gradle task assembleDebug failed with exit code 1
Hmm, I just reinstalled Java and it started working. Specifically, I made sure Java 8 was working.
You should set minSdkVersion on build.grade by lower number, like this
minSdkVersion 21
When I run flutter app in Android Emulator with Android Studio,it throws a error like this:
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
Multiple task action failures occurred:
A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
> The minCompileSdk (31) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-30).
Dependency: androidx.window:window-java:1.0.0-beta04.
AAR metadata file: /Users/yh/.gradle/caches/transforms-2/files-2.1/625039eaad011f884ddd84f857a44b7f/jetified-window-java-1.0.0-beta04/META-INF/com/android/build/gradle/aar-metadata.properties.
A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
> The minCompileSdk (31) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-30).
Dependency: androidx.window:window:1.0.0-beta04.
AAR metadata file: /Users/yh/.gradle/caches/transforms-2/files-2.1/a78fdf90e4c1f8464b19895cfb365f3f/jetified-window-1.0.0-beta04/META-INF/com/android/build/gradle/aar-metadata.properties.
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 11m 11s
Exception: Gradle task assembleDebug failed with exit code 1
anyone can help me?
In react native, after adding onesignal package I am getting this error. Can anybody help me about this issue??
Task :app:checkDebugAarMetadata 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
25 actionable tasks: 5 executed, 20 up-to-date
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
The minCompileSdk (31) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-30).
Dependency: androidx.work:work-runtime:2.7.1.
AAR metadata file: /Users/user/.gradle/caches/transforms-3/3db9d940a0e1f63c8669f0ed70305a71/transformed/work-runtime-2.7.1/META-INF/com/android/build/gradle/aar-metadata.properties.
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 17s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
The minCompileSdk (31) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-30).
Dependency: androidx.work:work-runtime:2.7.1.
AAR metadata file: /Users/user/.gradle/caches/transforms-3/3db9d940a0e1f63c8669f0ed70305a71/transformed/work-runtime-2.7.1/META-INF/com/android/build/gradle/aar-metadata.properties.
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
And my build options like this:
ext {
buildToolsVersion = "30.0.2"
minSdkVersion = 21
compileSdkVersion = 30
targetSdkVersion = 30
ndkVersion = "20.1.5948944"
}
Launching lib\main.dart on AOSP on IA Emulator in debug mode...
Running Gradle task 'assembleDebug'...
Warning: The plugin path_provider_android requires Android SDK version 31.
Warning: The plugin shared_preferences_android requires Android SDK version 31.
One or more plugins require a higher Android SDK version.
Fix this issue by adding the following to D:\App Dev Projects\marvelyprojects\android\app\build.gradle:
android {
compileSdkVersion 31
...
}
Parameter format not correct -
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
Multiple task action failures occurred:
A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
> The minCompileSdk (31) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-30).
Dependency: androidx.window:window-java:1.0.0-beta04.
AAR metadata file: C:\Users\ashra.gradle\caches\transforms-2\files-2.1\8f42c4deb4a5577a51d166e18b5fb030\jetified-window-java-1.0.0-beta04\META-INF\com\android\build\gradle\aar-metadata.properties.
A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
> The minCompileSdk (31) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-30).
Dependency: androidx.window:window:1.0.0-beta04.
AAR metadata file: C:\Users\ashra.gradle\caches\transforms-2\files-2.1\3f788c64cd9fb84deaf5d81b1bbcf4d4\jetified-window-1.0.0-beta04\META-INF\com\android\build\gradle\aar-metadata.properties.
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 11s
Exception: Gradle task assembleDebug failed with exit code 1
Following steps fixed the same issue which I was facing on flutter/vscode.
1/..android\app\build.gradle: change 'compileSdkVersion' and 'targetSdkVersion' to 31 (from 30)
2/ above change gave new error ==> ....
build\app\intermediates\packaged_manifests\debug\AndroidManifest.xml:2: AAPT: error: attribute 'package' in tag is not a valid Android package name: 'com.ulusoyapps.sharewhatyouknow.002-navigator2'.
3/ as per https://developer.android.com/guide/topics/manifest/manifest-element.html#package, packagge name was incorrect. I changed it to 'com.ulusoyapps.sharewhatyouknow.a002_navigator2' ,
"package" ==> build\app\intermediates\packaged_manifests\debug\AndroidManifest.xml
"applicationId" ==> android\app\build.gradle
4/ above change gave following error...
BUILD FAILED in 11s
┌─ Flutter Fix ────────────────────────────────────────────────────────────────────────────────────┐
│ [!] Your project requires a newer version of the Kotlin Gradle plugin. │
│ Find the latest version on https://kotlinlang.org/docs/gradle.html#plugin-and-versions, then │
│ update D:\adnan\flutter\ex\Flutter-ShareWhatYouKnow-develop\002-navigator2\android\build.gradle: │
│ ext.kotlin_version = '' │
└──────────────────────────────────────────────────────────────────────────────────────────────────┘
5/ changed ext.kotlin_version = '1.3.50' in ... android\build.gradle to 1.6.10