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
Related
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ':app'.
Could not resolve all dependencies for configuration ':app:_debugApk'.
A problem occurred configuring project ':react-native-linear-gradient'.
Could not resolve all dependencies for configuration ':react-native-linear-gradient:_debugCompileCopy'.
Could not find com.android.support:appcompat-v7:26.1.0.
Searched in the following locations:
file:/Users/omkaryadav/Library/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.pom
file:/Users/omkaryadav/Library/Android/sdk/extras/android/m2repository/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.jar
file:/Users/omkaryadav/Documents/project/react/Archive/android/sdk-manager/com/android/support/appcompat-v7/26.1.0/appcompat-v7-26.1.0.jar
Required by:
project :react-native-linear-gradient > com.facebook.react:react-native:0.56.0
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: 13.577 secs
You have to link 3rd party libraries before building your project. That specific library you can link automatically by running react-native link.
If you didn't already, run npm install before command above.
I'm new at Cordova and I'm trying to solve this for two days.
When I hit the command: Cordova run android --device this shows up:
C:\Users\Arthur\nameoftheapp>cordova run android --device
ANDROID_HOME=C:\Users\Arthur\Downloads\Aprender\adt-bundle-windows-x86_64-201407
02\adt-bundle-windows-x86_64-20140702\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_172
Subproject Path: CordovaLib
Incremental java compilation is an incubating feature.
BUILD FAILED
Total time: 7.354 secs
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'android'.
Could not resolve all dependencies for configuration ':_debugApkCopy'.
Could not find com.android.support:appcompat-v7:27.0.0.
Required by:
:android:unspecified
Could not find com.android.support:support-v4:27.0.0.
Required by:
:android:unspecified
Could not find com.android.support:support-v4:27.0.0.
Required by:
:android:unspecified > com.google.android.gms:play-services-gcm:9.8.0 >
com.google.android.gms:play-services-basement:9.8.0
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring root project 'android'.
Could not resolve all dependencies for configuration ':_debugApkCopy'.
Could not find com.android.support:appcompat-v7:27.0.0.
Required by:
:android:unspecified
Could not find com.android.support:support-v4:27.0.0.
Required by:
:android:unspecified
Could not find com.android.support:support-v4:27.0.0.
Required by:
:android:unspecified > com.google.android.gms:play-services-gcm:9.8.0 >
com.google.android.gms:play-services-basement:9.8.0
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
I tried to change the version in the build.gradle to another but when I compile, it changes back.
Do you used many cordova plugin with you'r application ?
if yes you can handle this with this plugin : https://github.com/dpa99c/cordova-android-support-gradle-release
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.
i was creating some phonegap application two weeks ago and everything was compiling nice. Yesterday i just wanted to build android version with some changes and it crashes with:
C:\rpb\appSample>phonegap build -- --minSdkVersion=15
[phonegap] executing 'cordova build -- --minSdkVersion=15'...
Running command: cmd "/s /c "C:\rpb\appSample\platforms\android\cordova\build.bat --minSdkVersion=15""
ANDROID_HOME=C:\Users\admin\.android
JAVA_HOME=C:\Program Files\java\jdk1.8.0_71
Running: C:\rpb\appSample\platforms\android\gradlew cdvBuildDebug -b C:\rpb\appSample\platforms\android\build.gradle -Dorg.gradle.daemon=true -PcdvMinSdkVersion=15
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 com.android.support:support-v4:23.2.0.
Searched in the following locations:
https://repo1.maven.org/maven2/com/android/support/support-v4/23.2.0/support-v4-23.2.0.pom
https://repo1.maven.org/maven2/com/android/support/support-v4/23.2.0/support-v4-23.2.0.jar
file:/C:/Users/admin/.android/extras/android/m2repository/com/android/support/support-v4/23.2.0/support-v4-23.2.0.pom
file:/C:/Users/admin/.android/extras/android/m2repository/com/android/support/support-v4/23.2.0/support-v4-23.2.0.jar
file:/C:/Users/admin/.android/extras/google/m2repository/com/android/support/support-v4/23.2.0/support-v4-23.2.0.pom
file:/C:/Users/admin/.android/extras/google/m2repository/com/android/support/support-v4/23.2.0/support-v4-23.2.0.jar
Required by:
:android:unspecified > com.android.support:support-v13:23.1.1
> Could not find com.android.support:support-v4:23.2.0.
Searched in the following locations:
https://repo1.maven.org/maven2/com/android/support/support-v4/23.2.0/support-v4-23.2.0.pom
https://repo1.maven.org/maven2/com/android/support/support-v4/23.2.0/support-v4-23.2.0.jar
file:/C:/Users/admin/.android/extras/android/m2repository/com/android/support/support-v4/23.2.0/support-v4-23.2.0.pom
file:/C:/Users/admin/.android/extras/android/m2repository/com/android/support/support-v4/23.2.0/support-v4-23.2.0.jar
file:/C:/Users/admin/.android/extras/google/m2repository/com/android/support/support-v4/23.2.0/support-v4-23.2.0.pom
file:/C:/Users/admin/.android/extras/google/m2repository/com/android/support/support-v4/23.2.0/support-v4-23.2.0.jar
Required by:
:android:unspecified > com.facebook.android:facebook-android-sdk:4.10.1
>
Could not find com.android.support:cardview-v7:23.2.0.
Searched in the following locations:
https://repo1.maven.org/maven2/com/android/support/cardview-v7/23.2.0/cardview-v7-23.2.0.pom
https://repo1.maven.org/maven2/com/android/support/cardview-v7/23.2.0/cardview-v7-23.2.0.jar
file:/C:/Users/admin/.android/extras/android/m2repository/com/android/support/cardview-v7/23.2.0/cardview-v7-23.2.0.pom
file:/C:/Users/admin/.android/extras/android/m2repository/com/android/support/cardview-v7/23.2.0/cardview-v7-23.2.0.jar
file:/C:/Users/admin/.android/extras/google/m2repository/com/android/support/cardview-v7/23.2.0/cardview-v7-23.2.0.pom
file:/C:/Users/admin/.android/extras/google/m2repository/com/android/support/cardview-v7/23.2.0/cardview-v7-23.2.0.jar
Required by:
:android:unspecified > com.facebook.android:facebook-android-sdk:4.10.1
>
Could not find com.android.support:support-v4:23.2.0.
Searched in the following locations:
https://repo1.maven.org/maven2/com/android/support/support-v4/23.2.0/support-v4-23.2.0.pom
https://repo1.maven.org/maven2/com/android/support/support-v4/23.2.0/support-v4-23.2.0.jar
file:/C:/Users/admin/.android/extras/android/m2repository/com/android/support/support-v4/23.2.0/support-v4-23.2.0.pom
file:/C:/Users/admin/.android/extras/android/m2repository/com/android/support/support-v4/23.2.0/support-v4-23.2.0.jar
file:/C:/Users/admin/.android/extras/google/m2repository/com/android/support/support-v4/23.2.0/support-v4-23.2.0.pom
file:/C:/Users/admin/.android/extras/google/m2repository/com/android/support/support-v4/23.2.0/support-v4-23.2.0.jar
Required by:
:android:unspecified > com.google.android.gms:play-services-gcm:8.4.0 > com.google.android.gms:play-services-base:8.4.0 > com.google.android.gms:play-services-basement:8.4.0
* 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: 2.881 secs
C:\rpb\appSample\platforms\android\cordova\node_modules\q\q.js:126
throw e;
^
Error code 1 for command: cmd with args: /s /c "C:\rpb\appSample\platforms\android\gradlew cdvBuildDebug -b C:\rpb\appSample\platforms\android\build.gradle -Dorg.gradle.daemon=true -P
cdvMinSdkVersion=15"
ERROR building one of the platforms: Error: cmd: Command failed with exit code 1
You may not have the required environment or OS to build this project
Error: cmd: Command failed with exit code 1
My android sdk manager packages is updated and Android Support Library is in version 23.2.1
I had found that something crashed few weeks ago
http://community.phonegap.com/nitobi/topics/i-cant-build-my-app-anymore-same-code-was-running-few-weeks-ago
and this guys say that i've to downgrade my packages. Can anyone tell me how to do it?
after full update of android sdk's
and change in
../platform/android/project.properties
to
target=android-23
everything is working :)
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"