I am trying to build a IONIC project but I am facing this exception and I am not able to debug the solution for this.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> failed to find Build Tools revision 24.0.1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
Error: Error code 1 for command: cmd with args: /s,/c,"C:\application\Qrioh\plat
forms\android\gradlew cdvBuildDebug -b C:\application\Qrioh\platforms\android\bu
ild.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"
Go to File > Project Structure > Select Module > Properties
Select Build Tools Version same as version selected in Compile Sdk Version.
Hope this will resolve your issue.
Related
i am getting build error after i add android:requestLegacyExternalStorage="true" in Androidmanifest.xml file, without android:requestLegacyExternalStorage="true" can build . In android ver 10 devices cant create directory so i added android:requestLegacyExternalStorage="true".
I am build with node.js cmd prompt. Error as follow
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 4.908 secs
cmd: Command failed with exit code 1 Error output:
F:\Mobile Projects\1652019\FingerTips\OAMobile\platforms\android\build\intermediates\manifests\full\debug\AndroidManifest.xml:39: AAPT: No resource identifier found for attribute 'requestLegacyExternalStorage' in package 'android'
F:\Mobile Projects\1652019\FingerTips\OAMobile\platforms\android\build\intermediates\manifests\full\debug\AndroidManifest.xml:39: error: No resource identifier found for attribute 'requestLegacyExternalStorage' in package 'android'
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processDebugResources'.
What i tried, i remove android platform and add again, still getting error, i install this plugin also cordova plugin add cordova-android-support-gradle-release --variable ANDROID_SUPPORT_VERSION=27.+
when i trace with this command gradle compileDebug --scan , i get below 2 error
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
Where:
Script 'F:\Mobile Projects\1652019\FingerTips\OAMobile\platforms\android\CordovaLib\cordova.gradle' line: 64
What went wrong:
A problem occurred evaluating root project 'android'.
No installed build tools found. Install the Android build tools version 19.1.0 or higher.
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.
2: Task failed with an exception.
What went wrong:
A problem occurred configuring root project 'android'.
buildToolsVersion is not specified.
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.
Regards and Thanks
Aravind
AAPT: No resource identifier found for attribute 'requestLegacyExternalStorage' in package 'android'
This is generally caused by using an incompatible build tools version. For requestLegacyExternalStorage, you need version 29.x build tools.
Open up Android Studio's SDK Manager and install the latest version of build tools available. Then make sure the build tools directory is in your PATH environment variable. Don't forget to restart your terminal session after changing your environment variables.
I cloned git project https://github.com/fbsamples/f8app
I do all the instructions. But when I try to run the project (run-android) error occurs.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> A problem occurred configuring project ':react-native-fbsdk'.
> Could not resolve all dependencies for configuration ':react-native-fbsdk:_debugCompile'.
> Could not find com.android.support:appcompat-v7:25.0.0.
Searched in the following locations:
file:/Users/Mastermind/.m2/repository/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.pom
file:/Users/Mastermind/.m2/repository/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.jar
https://jcenter.bintray.com/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.pom
https://jcenter.bintray.com/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.jar
file:/Users/Mastermind/Desktop/ReactNative/f8app/node_modules/node_modules/react-native/android/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.pom
file:/Users/Mastermind/Desktop/ReactNative/f8app/node_modules/node_modules/react-native/android/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.jar
file:/Users/Mastermind/Library/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.pom
file:/Users/Mastermind/Library/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.jar
file:/Users/Mastermind/Library/Android/sdk/extras/google/m2repository/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.pom
file:/Users/Mastermind/Library/Android/sdk/extras/google/m2repository/com/android/support/appcompat-v7/25.0.0/appcompat-v7-25.0.0.jar
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 1 mins 20.189 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
I'm trying to build an Android application with cordova, when i launch:
cordova build android
an error occurred, and i don't understand how to solve this problem.
If i build my project with Android Studio the gradle is fixed by the IDE, but if i try to compile with cordova command line i have the error that i indicated.
How i can solve ? I need to use command line not Android Studio.
ANDROID_HOME=E:\sdk
JAVA_HOME=C:\Program Files\java\jdk1.8.0_91
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\MY\Desktop\testSpeedTest\platforms\android\build.gradle' line: 22
* What went wrong:
A problem occurred evaluating root project 'android'.
> Failed to apply plugin [id 'android']
> Gradle version 2.10 is required. Current version is 2.2.1. If using the gradle wrapper, try editing the distributionUrl in C:\Users\MY\Desktop\testSpeedTest\gradle\wrapper\gradle-wrapper.properties to gradle-2.10-all.zip
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 1.777 secs
Error: Error code 1 for command: cmd with args: /s,/c,"C:\Users\MY\Desktop\testSpeedTest\platforms\android\gradlew cdvBuildDebug -b C:\Users\MY\Desktop\testSpeedTest\platforms\android\build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"
When I am running the ionic build android command I am getting the below error.
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'android'.
Could not resolve all dependencies for configuration ':_debugCompile'.
Could not find any version that matches com.android.support:support-v4:+.
Searched in the following locations:
https://repo1.maven.org/maven2/com/android/support/support-v4/maven-met
adata.xml
https://repo1.maven.org/maven2/com/android/support/support-v4/
Required by:
:android:unspecified
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
BUILD FAILED
Total time: 11.915 secs
Error: Error code 1 for command: cmd with args: /s,/c,"D:\morrison\myApp\platfor
ms\android\gradlew cdvBuildDebug -b D:\morrison\myApp\platforms\android\build.gr
adle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"
I have checked the sdk and the android support seems to be installed. Please let me know how I can resolve this issue
you should open sdk manager and you can see Google Repository under the Extras folder
Hello I'm using latest version of Cordova 6.1.0 and Android SDK Tools.
when I add any admob plugins. the following error message returned after using build command.
A problem occurred configuring root project 'android'
how can I fix this?
BTW please don't send workarounds for Android Studio. I just need to be able to build APK files via cordova and I don't use Android Studio.
Full error details as following:
JAVA_HOME=C:\Program Files (x86)\java\jdk1.7.0_71
FAILURE: Build failed with an exception.
What went wrong: A problem occurred configuring root project 'android'.
Could not resolve all dependencies for configuration ':_debugCompile'.
Could not find any version that matches com.google.android.gms:play-services:+.
Searched in the following locations:
https://repo1.maven.org/maven2/com/google/android/gms/play-services/maven-metadata.xml
https://repo1.maven.org/maven2/com/google/android/gms/play-services/
Required by:
:android:unspecified
BUILD FAILED
Total time: 11.78 secs
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Error: Error code 1 for command: cmd with args:
/s,/c,"C:\nm\tests\platforms\android\gradlew cdvBuildDebug -b
C:\nm\tests\platforms\android\build.gradle -Dorg.gradle.daemon=true
-Pandroid.useDeprecatedNdk=true"