Build failed for Android
See original GitHub issuethe reports
╰─➤ ionic build android
Running command: /Users/SupeRodv2/dev4living/RodLab/HeyCommunity/frontend/hooks/after_prepare/010_add_platform_class.js /Users/SupeRodv2/dev4living/RodLab/HeyCommunity/frontend
add to body class: platform-android
ANDROID_HOME=/Users/SupeRodv2/android-sdk-macosx
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home
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-metadata.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: 13.091 secs
ERROR building one of the platforms: Error code 1 for command: /Users/SupeRodv2/dev4living/RodLab/HeyCommunity/frontend/platforms/android/gradlew with args: cdvBuildDebug,-b,/Users/SupeRodv2/dev4living/RodLab/HeyCommunity/frontend/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Pandroid.useDeprecatedNdk=true
You may not have the required environment or OS to build this project
Error: Error code 1 for command: /Users/SupeRodv2/dev4living/RodLab/HeyCommunity/frontend/platforms/android/gradlew with args: cdvBuildDebug,-b,/Users/SupeRodv2/dev4living/RodLab/HeyCommunity/frontend/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Pandroid.useDeprecatedNdk=true
build iOS success build android failed
help me
Issue Analytics
- State:
- Created 7 years ago
- Comments:12
Top Results From Across the Web
Failed to build project with Android studio - Stack Overflow
File->Other Settings->Default Project Structure · Under Project Settings: Project, set Project SDK as Android SDK. · Click Edit button · For Android SDK,...
Read more >Why does a build fail in Android Studio even if I don't have any ...
There are several causes for gradle build fail in Android studio. Few reasons might be: * Dependencies added * Importing the project from...
Read more >Different Ways to fix "Error running android: Gradle project ...
Method 1: Restarting your project using Invalidate Caches and Restart option · Method 2: Sync your project with Gradle files · Method 3:...
Read more >Gradle build failed with unknown error. Please see logs for the ...
I was using expo build:android but after upgrading to eas-build It is showing me this error : Android build failed: Gradle build failed...
Read more >Known issues with Android Studio and Android Gradle Plugin
Find out about current known issues with Android Studio and the Android Gradle Plugin.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
SOLVED (on OSX):
I was updating Android again via command line:
android update sdk --no-ui --filter extra
android update sdk --no-ui --all --filter "extra-android-m2repository
Then I removed the plugin
cordova-plugin-android-support-v4
:ionic plugin remove cordova-plugin-android-support-v4 --save
Now my build is
SUCCESSFUL
again!I just get some hints now, but this is not blocking the build:
:compileDebugJavaWithJavac -> Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details.
I had the same issue: The steps below solved the issue for me. Give a try:
Finally, the build was successful.
Happy coding 😃