# Error building android, any idea?

**URL:** <https://forum.ionicframework.com/t/error-building-android-any-idea/145360>\
**Category:** cordova\
**Created:** [October 23, 2018, 11:25am UTC](https://forum.ionicframework.com/t/error-building-android-any-idea/145360 "2018-10-23T11:25:33Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![codiqa100095421](https://avatars.discourse-cdn.com/v4/letter/c/73ab20/32.png) [@codiqa100095421](https://forum.ionicframework.com/u/codiqa100095421)\
**Post date:** [October 23, 2018, 11:25am UTC](https://forum.ionicframework.com/t/error-building-android-any-idea/145360/1 "2018-10-23T11:25:33Z")

</div>

```auto
FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':app:debugCompileClasspath'.
> Could not find support-v4.jar (com.android.support:support-v4:27.1.1).
  Searched in the following locations:
      https://jcenter.bintray.com/com/android/support/support-v4/27.1.1/support-v4-27.1.1.jar

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

:app:javaPreCompileDebug FAILED
26 actionable tasks: 1 executed, 25 up-to-date
* Get more help at https://help.gradle.org

BUILD FAILED in 1s
cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':app:debugCompileClasspath'.
> Could not find support-v4.jar (com.android.support:support-v4:27.1.1).
  Searched in the following locations:
      https://jcenter.bintray.com/com/android/support/support-v4/27.1.1/support-v4-27.1.1.jar

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s
[ERROR] An error occurred while running subprocess cordova.

        cordova build android exited with exit code 1.

        Re-running this command with the --verbose flag may provide more information.

```

(ionic 4.2)  
any idea?

Thanks 🙂

---

<div class="post-metadata">

**Author:** ![stathis90](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@stathis90](https://forum.ionicframework.com/u/stathis90)\
**Post date:** [October 23, 2018, 1:05pm UTC](https://forum.ionicframework.com/t/error-building-android-any-idea/145360/2 "2018-10-23T13:05:33Z")

</div>

I have the same issue

---

<div class="post-metadata">

**Author:** ![stathis90](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@stathis90](https://forum.ionicframework.com/u/stathis90)\
**Post date:** [October 23, 2018, 1:51pm UTC](https://forum.ionicframework.com/t/error-building-android-any-idea/145360/3 "2018-10-23T13:51:14Z")

</div>

> [@Ionic pro package failed after successful deploy](https://forum.ionicframework.com/t/ionic-pro-package-failed-after-successful-deploy/145355/15):
>
> That was it, thank you lukas

---

<div class="post-metadata">

**Author:** ![codiqa100095421](https://avatars.discourse-cdn.com/v4/letter/c/73ab20/32.png) [@codiqa100095421](https://forum.ionicframework.com/u/codiqa100095421)\
**Post date:** [October 23, 2018, 2:18pm UTC](https://forum.ionicframework.com/t/error-building-android-any-idea/145360/4 "2018-10-23T14:18:13Z")

</div>

![image](https://global.discourse-cdn.com/ionicframework/original/3X/2/c/2ce8a6aaa60c2695486e3ffcf8ed7eb9e5a80718.png)

still got this

Works ! i needed to reinstall the android platform as well

---

<div class="post-metadata">

**Author:** ![stathis90](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@stathis90](https://forum.ionicframework.com/u/stathis90)\
**Post date:** [October 23, 2018, 2:27pm UTC](https://forum.ionicframework.com/t/error-building-android-any-idea/145360/5 "2018-10-23T14:27:11Z")

</div>

I changed the repositories for build.gradle in platforms\android\app and in platforms\android and it works… Try searching for your repositories

 ![image](https://global.discourse-cdn.com/ionicframework/original/3X/6/3/632f70423ff0a3a802a03f05aac60bd574221e3b.png)

---

<div class="post-metadata">

**Author:** ![faq718](https://avatars.discourse-cdn.com/v4/letter/f/c68b51/32.png) [@faq718](https://forum.ionicframework.com/u/faq718)\
**Post date:** [October 23, 2018, 2:45pm UTC](https://forum.ionicframework.com/t/error-building-android-any-idea/145360/6 "2018-10-23T14:45:22Z")

</div>

this Works for me!, thanks

---

<div class="post-metadata">

**Author:** ![codiqa100095421](https://avatars.discourse-cdn.com/v4/letter/c/73ab20/32.png) [@codiqa100095421](https://forum.ionicframework.com/u/codiqa100095421)\
**Post date:** [October 23, 2018, 2:54pm UTC](https://forum.ionicframework.com/t/error-building-android-any-idea/145360/7 "2018-10-23T14:54:17Z")

</div>

Works ! i needed to reinstall the android platform as well

---

<div class="post-metadata">

**Author:** ![a-m](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/a-m/32/122349_2.png) [@a-m](https://forum.ionicframework.com/u/a-m)\
**Post date:** [October 23, 2018, 3:34pm UTC](https://forum.ionicframework.com/t/error-building-android-any-idea/145360/8 "2018-10-23T15:34:53Z")

</div>

Is it possible to change this using `build-extras.gradle` file instead?

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:12pm UTC](https://forum.ionicframework.com/t/error-building-android-any-idea/145360/9 "2021-07-19T21:12:20Z")

</div>

Closed on July 19, 2021, 9:12pm UTC


