# Ionic build failed on android

**URL:** <https://forum.ionicframework.com/t/ionic-build-failed-on-android/122454>\
**Category:** ionic-v3\
**Created:** [February 23, 2018, 1:57pm UTC](https://forum.ionicframework.com/t/ionic-build-failed-on-android/122454 "2018-02-23T13:57:43Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![shriharip](https://avatars.discourse-cdn.com/v4/letter/s/f475e1/32.png) [@shriharip](https://forum.ionicframework.com/u/shriharip)\
**Post date:** [February 23, 2018, 1:57pm UTC](https://forum.ionicframework.com/t/ionic-build-failed-on-android/122454/1 "2018-02-23T13:57:43Z")

</div>

Hello,

I am new to Ionic and programming and this is my first question, so please bear with me.  
I am trying to build the app on android to do better debugging and check for geolocation and camera apis. But I am not successful.

I have more than 50 errors showing on my build. But everything looks like more or less related to the environment is what I believe looking at the various support forums.

My enviroment ( building on Ubuntu 16.x)  
Node version 9 and npm version 5

cli packages: (/usr/local/lib/node\_modules)

```
@ionic/cli-utils : 1.19.1
ionic (Ionic CLI) : 3.19.1

```

global packages:

```
cordova (Cordova CLI) : 8.0.0 

```

local packages:

```
@ionic/app-scripts : 3.1.8
Cordova Platforms : android 7.0.0
Ionic Framework : ionic-angular 3.9.2

```

System:

```
Android SDK Tools : 26.1.1
Node : v9.0.0
npm : 5.6.0 
OS : Linux 4.13

```

Environment Variables:

```
ANDROID_HOME : /home/hari/Android/Sdk

```

My plugin list  
cordova-plugin-advanced-http 1.10.1 “Advanced HTTP plugin”  
cordova-plugin-contacts 3.0.1 “Contacts”  
cordova-plugin-device 1.1.4 “Device”  
cordova-plugin-file 6.0.1 “File”  
cordova-plugin-geolocation 4.0.1 “Geolocation”  
cordova-plugin-ionic-keyboard 2.0.5 “cordova-plugin-ionic-keyboard”  
cordova-plugin-ionic-webview 1.1.16 “cordova-plugin-ionic-webview”  
cordova-plugin-mauron85-background-geolocation 2.3.3 “CDVBackgroundGeolocation”  
cordova-plugin-splashscreen 4.0.3 “Splashscreen”  
cordova-plugin-whitelist 1.3.1 “Whitelist”

My package.json  
“dependencies”: {  
“@angular/common”: “5.0.3”,  
“@angular/compiler”: “5.0.3”,  
“@angular/compiler-cli”: “5.0.3”,  
“@angular/core”: “5.0.3”,  
“@angular/forms”: “5.0.3”,  
“@angular/http”: “5.0.3”,  
“@angular/platform-browser”: “5.0.3”,  
“@angular/platform-browser-dynamic”: “5.0.3”,  
“@ionic-native/background-geolocation”: “^4.5.3”,  
“@ionic-native/camera”: “4.3.3”,  
“@ionic-native/contacts”: “^4.5.3”,  
“@ionic-native/core”: “4.4.0”,  
“@ionic-native/geolocation”: “^4.5.3”,  
“@ionic-native/http”: “^4.5.3”,  
“@ionic-native/splash-screen”: “4.4.0”,  
“@ionic-native/status-bar”: “4.4.0”,  
“@ionic/pro”: “1.0.17”,  
“@ionic/storage”: “2.1.3”,  
“@ngx-translate/core”: “8.0.0”,  
“@ngx-translate/http-loader”: “^2.0.0”,  
“@types/lodash”: “^4.14.100”,  
“cordova-android”: “^7.0.0”,  
“cordova-plugin-advanced-http”: “^1.10.1”,  
“cordova-plugin-contacts”: “^3.0.1”,  
“cordova-plugin-device”: “^1.1.4”,  
“cordova-plugin-file”: “^6.0.1”,  
“cordova-plugin-geolocation”: “^4.0.1”,  
“cordova-plugin-ionic-keyboard”: “^2.0.5”,  
“cordova-plugin-ionic-webview”: “^1.1.16”,  
“cordova-plugin-mauron85-background-geolocation”: “^2.3.3”,  
“cordova-plugin-splashscreen”: “^4.0.3”,  
“cordova-plugin-whitelist”: “^1.3.1”,  
“core-js”: “^2.5.3”,  
“firebase”: “^4.9.0”,  
“geofire”: “^4.1.2”,  
“ionic-angular”: “3.9.2”,  
“ionicons”: “3.0.0”,  
“lodash”: “^4.17.4”,  
“mobx”: “^3.4.1”,  
“mobx-angular”: “^2.1.1”,  
“rxjs”: “5.5.2”,  
“sw-toolbox”: “3.6.0”,  
“zone.js”: “0.8.18”  
},  
“devDependencies”: {  
“@ionic/app-scripts”: “3.1.8”,  
“prettier”: “^1.10.2”,  
“typescript”: “2.4.2”  
},  
“description”: “An Ionic project”,  
“cordova”: {  
“plugins”: {  
“cordova-plugin-geolocation”: {  
“GEOLOCATION\_USAGE\_DESCRIPTION”: “To locate you”  
},  
“cordova-plugin-mauron85-background-geolocation”: {  
“GOOGLE\_PLAY\_SERVICES\_VERSION”: “+”,  
“ICON”: “@mipmap/icon”,  
“SMALL\_ICON”: “@mipmap/icon”,  
“ACCOUNT\_NAME”: “@string/app\_name”,  
“ACCOUNT\_LABEL”: “@string/app\_name”,  
“ACCOUNT\_TYPE”: “$PACKAGE\_NAME.account”,  
“CONTENT\_AUTHORITY”: “$PACKAGE\_NAME”  
},  
“cordova-plugin-contacts”: {},  
“cordova-plugin-advanced-http”: {},  
“cordova-plugin-whitelist”: {},  
“cordova-plugin-device”: {},  
“cordova-plugin-splashscreen”: {},  
“cordova-plugin-ionic-webview”: {},  
“cordova-plugin-ionic-keyboard”: {},  
“cordova-plugin-file”: {}  
},  
“platforms”: [  
“android”  
]  
}

ANDROID\_HOME=/home/hari/Android/Sdk  
JAVA\_HOME=/usr/lib/jvm/java-8-oracle

And finally the build errors  
cordova/BackgroundGeolocationPlugin.java:563: error: cannot find symbol  
@TargetApi(Build.VERSION\_CODES.KITKAT)  
^  
symbol: variable KITKAT  
location: class VERSION\_CODES

cordova/file/FileUtils.java:97: error: cannot find symbol  
Manifest.permission.READ\_EXTERNAL\_STORAGE,  
^  
symbol: variable READ\_EXTERNAL\_STORAGE  
location: class permission

android/app/src/main/java/org/apache/cordova/file/FileUtils.java:998: error: cannot find symbol  
ret.put(“externalDataDirectory”, toDirUrl(context.getExternalFilesDir(null)));  
^  
symbol: method getExternalFilesDir()

symbol: variable LOLLIPOP  
location: class VERSION\_CODES  
/home/hari/mysharedv1/platforms/android/app/src/main/java/org/apache/cordova/file/LocalFilesystem.java:424: error: cannot find symbol  
for (File f : context.getExternalMediaDirs()) {  
^  
symbol: method getExternalMediaDirs()  
location: variable context of type Context  
/home/hari/mysharedv1/platforms/android/app/src/main/java/org/apache/cordova/contacts/ContactAccessorSdk5.java:999: error: cannot find symbol  
photoCursor = mApp.getActivity().getContentResolver().query(photoUri, new String {ContactsContract.Contacts.Photo.PHOTO}, null, null, null);  
^  
symbol: variable PHOTO  
location: class Photo  
/home/hari/mysharedv1/platforms/android/app/src/main/java/org/apache/cordova/splashscreen/SplashScreen.java:290: error: cannot find symbol  
LayoutParams layoutParams = new LinearLayout.LayoutParams(LayoutParams.MATCH\_PARENT, LayoutParams.MATCH\_PARENT);  
^  
symbol: variable MATCH\_PARENT  
location: class LayoutParams  
/home/hari/mysharedv1/platforms/android/app/src/main/java/org/apache/cordova/splashscreen/SplashScreen.java:290: error: cannot find symbol  
LayoutParams layoutParams = new LinearLayout.LayoutParams(LayoutParams.MATCH\_PARENT, LayoutParams.MATCH\_PARENT);  
^  
symbol: variable MATCH\_PARENT  
location: class LayoutParams  
/home/hari/mysharedv1/platforms/android/app/src/main/java/org/apache/cordova/device/Device.java:132: error: cannot find symbol  
String serial = android.os.Build.SERIAL;  
^  
symbol: variable SERIAL  
location: class Build  
/home/hari/mysharedv1/platforms/android/app/src/main/java/com/marianhello/bgloc/LocationService.java:189: error: cannot find symbol  
if (Build.VERSION.SDK\_INT \>= Build.VERSION\_CODES.JELLY\_BEAN\_MR2) {  
^  
symbol: variable JELLY\_BEAN\_MR2  
location: class VERSION\_CODES  
/home/hari/mysharedv1/platforms/android/app/src/main/java/com/marianhello/bgloc/LocationService.java:190: error: cannot find symbol  
handlerThread.quitSafely();  
^  
symbol: method quitSafely()  
location: variable handlerThread of type HandlerThread  
/home/hari/mysharedv1/platforms/android/app/src/main/java/com/marianhello/bgloc/LocationService.java:198: error: method does not override or implement a method from a supertype  
@Override  
^  
/home/hari/mysharedv1/platforms/android/app/src/main/java/com/marianhello/bgloc/LocationService.java:207: error: cannot find symbol  
super.onTaskRemoved(rootIntent);  
^  
symbol: method onTaskRemoved(Intent)  
/home/hari/mysharedv1/platforms/android/app/src/main/java/com/marianhello/bgloc/LocationService.java:421: error: cannot find symbol  
if (Build.VERSION.SDK\_INT \>= Build.VERSION\_CODES.HONEYCOMB) {  
^  
symbol: variable HONEYCOMB  
location: class VERSION\_CODES  
/home/hari/mysharedv1/platforms/android/app/src/main/java/com/marianhello/bgloc/LocationService.java:422: error: cannot find symbol  
task.executeOnExecutor(AsyncTask.THREAD\_POOL\_EXECUTOR, location);  
^  
symbol: variable THREAD\_POOL\_EXECUTOR  
location: class AsyncTask  
/home/hari/mysharedv1/platforms/android/app/src/main/java/com/marianhello/bgloc/data/BackgroundLocation.java:55: error: cannot find symbol  
if (Build.VERSION.SDK\_INT \>= Build.VERSION\_CODES.JELLY\_BEAN\_MR1) {  
^  
symbol: variable JELLY\_BEAN\_MR1  
location: class VERSION\_CODES  
/home/hari/mysharedv1/platforms/android/app/src/main/java/com/marianhello/bgloc/data/BackgroundLocation.java:56: error: cannot find symbol  
elapsedRealtimeNanos = location.getElapsedRealtimeNanos();  
^  
symbol: method getElapsedRealtimeNanos()  
location: variable location of type Location  
/home/hari/mysharedv1/platforms/android/app/src/main/java/com/marianhello/bgloc/data/BackgroundLocation.java:58: error: cannot find symbol  
if (Build.VERSION.SDK\_INT \>= Build.VERSION\_CODES.JELLY\_BEAN\_MR2) {  
^  
symbol: variable JELLY\_BEAN\_MR2  
location: class VERSION\_CODES  
/home/hari/mysharedv1/platforms/android/app/src/main/java/com/marianhello/bgloc/data/BackgroundLocation.java:59: error: cannot find symbol  
isFromMockProvider = location.isFromMockProvider();  
^  
symbol: method isFromMockProvider()  
location: variable location of type Location  
/home/hari/mysharedv1/platforms/android/app/src/main/java/com/marianhello/bgloc/data/BackgroundLocation.java:567: error: cannot find symbol  
if (Build.VERSION.SDK\_INT \>= Build.VERSION\_CODES.JELLY\_BEAN\_MR1) {  
^  
symbol: variable JELLY\_BEAN\_MR1  
location: class VERSION\_CODES  
/home/hari/mysharedv1/platforms/android/app/src/main/java/com/marianhello/bgloc/data/BackgroundLocation.java:568: error: cannot find symbol  
l.setElapsedRealtimeNanos(elapsedRealtimeNanos);  
^  
symbol: method setElapsedRealtimeNanos(long)  
location: variable l of type Location  
/home/hari/mysharedv1/platforms/android/app/src/main/java/com/marianhello/bgloc/data/BackgroundLocation.java:592: error: cannot find symbol  
if (Build.VERSION.SDK\_INT \>= Build.VERSION\_CODES.JELLY\_BEAN\_MR1) {  
^  
symbol: variable JELLY\_BEAN\_MR1  
location: class VERSION\_CODES  
/home/hari/mysharedv1/platforms/android/app/src/main/java/com/marianhello/bgloc/data/sqlite/SQLiteOpenHelper.java:118: error: cannot find symbol  
Log.d(TAG, "Creating db: " + this.getDatabaseName());  
^  
symbol: method getDatabaseName()  
/home/hari/mysharedv1/platforms/android/app/src/main/java/com/marianhello/bgloc/data/sqlite/SQLiteOpenHelper.java:172: error: method does not override or implement a method from a supertype  
@Override  
^  
/home/hari/mysharedv1/platforms/android/app/src/main/java/com/marianhello/bgloc/data/sqlite/SQLiteLocationDAO.java:113: error: method queryNumEntries in class DatabaseUtils cannot be applied to given types;  
return DatabaseUtils.queryNumEntries(db, LocationEntry.TABLE\_NAME, whereClause, whereArgs);  
^  
required: SQLiteDatabase,String  
found: SQLiteDatabase,String,String,String  
reason: actual and formal argument lists differ in length  
/home/hari/mysharedv1/platforms/android/app/src/main/java/com/marianhello/bgloc/data/sqlite/SQLiteLocationDAO.java:154: error: cannot find symbol  
db.beginTransactionNonExclusive();  
^  
symbol: method beginTransactionNonExclusive()  
location: variable db of type SQLiteDatabase  
/home/hari/mysharedv1/platforms/android/app/src/main/java/com/marianhello/bgloc/sync/BatchManager.java:70: error: cannot find symbol  
db.beginTransactionNonExclusive();  
^  
symbol: method beginTransactionNonExclusive()  
location: variable db of type SQLiteDatabase  
/home/hari/mysharedv1/platforms/android/app/src/main/java/com/marianhello/bgloc/sync/SyncAdapter.java:71: error: constructor AbstractThreadedSyncAdapter in class AbstractThreadedSyncAdapter cannot be applied to given types;  
super(context, autoInitialize, allowParallelSyncs);  
^  
required: Context,boolean  
found: Context,boolean,boolean  
reason: actual and formal argument lists differ in length  
/home/hari/mysharedv1/platforms/android/app/src/main/java/com/marianhello/bgloc/sync/SyncService.java:60: error: cannot find symbol  
settingsBundle.putBoolean(ContentResolver.SYNC\_EXTRAS\_DO\_NOT\_RETRY, false);  
^  
symbol: variable SYNC\_EXTRAS\_DO\_NOT\_RETRY  
location: class ContentResolver  
/home/hari/mysharedv1/platforms/android/app/src/main/java/com/marianhello/bgloc/HttpPostService.java:59: error: cannot find symbol  
if (Build.VERSION.SDK\_INT \>= Build.VERSION\_CODES.KITKAT) {  
^  
symbol: variable KITKAT  
location: class VERSION\_CODES  
/home/hari/mysharedv1/platforms/android/app/src/main/java/com/tenforwardconsulting/bgloc/DistanceFilterLocationProvider.java:148: error: cannot find symbol  
criteria.setHorizontalAccuracy(translateDesiredAccuracy(config.getDesiredAccuracy()));  
^  
symbol: method setHorizontalAccuracy(Integer)  
location: variable criteria of type Criteria  
/home/hari/mysharedv1/platforms/android/app/src/main/java/com/tenforwardconsulting/bgloc/DistanceFilterLocationProvider.java:166: error: cannot find symbol  
if (provider != LocationManager.PASSIVE\_PROVIDER) {  
^  
symbol: variable PASSIVE\_PROVIDER  
location: class LocationManager  
/home/hari/mysharedv1/platforms/android/app/src/main/java/com/tenforwardconsulting/bgloc/DistanceFilterLocationProvider.java:187: error: cannot find symbol  
accuracy = Criteria.ACCURACY\_LOW;  
^  
symbol: variable ACCURACY\_LOW  
location: class Criteria  
/home/hari/mysharedv1/platforms/android/app/src/main/java/com/tenforwardconsulting/bgloc/DistanceFilterLocationProvider.java:190: error: cannot find symbol  
accuracy = Criteria.ACCURACY\_MEDIUM;  
^  
symbol: variable ACCURACY\_MEDIUM  
location: class Criteria  
/home/hari/mysharedv1/platforms/android/app/src/main/java/com/tenforwardconsulting/bgloc/DistanceFilterLocationProvider.java:193: error: cannot find symbol  
accuracy = Criteria.ACCURACY\_HIGH;  
^  
symbol: variable ACCURACY\_HIGH  
location: class Criteria  
/home/hari/mysharedv1/platforms/android/app/src/main/java/com/tenforwardconsulting/bgloc/DistanceFilterLocationProvider.java:196: error: cannot find symbol  
accuracy = Criteria.ACCURACY\_HIGH;  
^  
symbol: variable ACCURACY\_HIGH  
location: class Criteria  
/home/hari/mysharedv1/platforms/android/app/src/main/java/com/tenforwardconsulting/bgloc/DistanceFilterLocationProvider.java:199: error: cannot find symbol  
accuracy = Criteria.ACCURACY\_MEDIUM;  
^  
symbol: variable ACCURACY\_MEDIUM  
location: class Criteria  
/home/hari/mysharedv1/platforms/android/app/src/main/java/com/tenforwardconsulting/bgloc/DistanceFilterLocationProvider.java:463: error: cannot find symbol  
criteria.setHorizontalAccuracy(Criteria.ACCURACY\_HIGH);  
^  
symbol: variable ACCURACY\_HIGH  
location: class Criteria  
/home/hari/mysharedv1/platforms/android/app/src/main/java/com/tenforwardconsulting/bgloc/DistanceFilterLocationProvider.java:467: error: cannot find symbol  
locationManager.requestSingleUpdate(criteria, singleUpdatePI);  
^  
symbol: method requestSingleUpdate(Criteria,PendingIntent)  
location: variable locationManager of type LocationManager  
/home/hari/mysharedv1/platforms/android/app/src/main/java/com/tenforwardconsulting/cordova/BackgroundGeolocationPlugin.java:535: error: cannot find symbol  
activity.bindService(locationServiceIntent, mConnection, Context.BIND\_IMPORTANT);  
^  
symbol: variable BIND\_IMPORTANT  
location: class Context  
/home/hari/mysharedv1/platforms/android/app/src/main/java/com/tenforwardconsulting/cordova/BackgroundGeolocationPlugin.java:569: error: cannot find symbol  
return getContext().registerReceiver(locationModeChangeReceiver, new IntentFilter(LocationManager.MODE\_CHANGED\_ACTION));  
^  
symbol: variable MODE\_CHANGED\_ACTION  
location: class LocationManager  
/home/hari/mysharedv1/platforms/android/app/src/main/java/com/tenforwardconsulting/cordova/BackgroundGeolocationPlugin.java:585: error: cannot find symbol  
Intent intent = new Intent(Settings.ACTION\_APPLICATION\_DETAILS\_SETTINGS);  
^  
symbol: variable ACTION\_APPLICATION\_DETAILS\_SETTINGS  
location: class Settings  
/home/hari/mysharedv1/platforms/android/app/src/main/java/com/tenforwardconsulting/cordova/BackgroundGeolocationPlugin.java:598: error: cannot find symbol  
if (Build.VERSION.SDK\_INT \>= Build.VERSION\_CODES.KITKAT) {  
^  
symbol: variable KITKAT  
location: class VERSION\_CODES  
/home/hari/mysharedv1/platforms/android/app/src/main/java/com/tenforwardconsulting/cordova/BackgroundGeolocationPlugin.java:599: error: cannot find symbol  
locationMode = Settings.Secure.getInt(context.getContentResolver(), Settings.Secure.LOCATION\_MODE);  
^  
symbol: variable LOCATION\_MODE  
location: class Secure  
/home/hari/mysharedv1/platforms/android/app/src/main/java/com/tenforwardconsulting/cordova/BackgroundGeolocationPlugin.java:600: error: cannot find symbol  
return locationMode != Settings.Secure.LOCATION\_MODE\_OFF;  
^  
symbol: variable LOCATION\_MODE\_OFF  
location: class Secure  
/home/hari/mysharedv1/platforms/android/app/src/main/java/io/ionic/keyboard/IonicKeyboard.java:91: error: cannot find symbol  
display.getSize(size);  
^  
symbol: method getSize(Point)  
location: variable display of type Display  
/home/hari/mysharedv1/platforms/android/app/src/main/java/io/ionic/keyboard/IonicKeyboard.java:131: error: cannot find symbol  
rootView.getViewTreeObserver().removeOnGlobalLayoutListener(list);  
^  
symbol: method removeOnGlobalLayoutListener(OnGlobalLayoutListener)  
location: class ViewTreeObserver  
Note: Some input files use or override a deprecated API.  
Note: Recompile with -Xlint:deprecation for details.  
Note: Some input files use unchecked or unsafe operations.  
Note: Recompile with -Xlint:unchecked for details.  
53 errors

FAILURE: Build failed with an exception.

- What went wrong:  
Execution failed for task ‘:app:compileDebugJavaWithJavac’.

> Compilation failed; see the compiler error output for details.

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

Requesting help with how to proceed further from here.

I tried to remove and add plugins, I moved to different api level ,

 Which way should i proceed?

---

<div class="post-metadata">

**Author:** ![clockwise](https://avatars.discourse-cdn.com/v4/letter/c/e95f7d/32.png) [@clockwise](https://forum.ionicframework.com/u/clockwise)\
**Post date:** [February 23, 2018, 2:08pm UTC](https://forum.ionicframework.com/t/ionic-build-failed-on-android/122454/2 "2018-02-23T14:08:52Z")

</div>

Add `cordova-android@6.4.0` to your package.json. Version 7.0.0 is used default and that gives the error. Just fixed myself this morning with this.

---

<div class="post-metadata">

**Author:** ![shriharip](https://avatars.discourse-cdn.com/v4/letter/s/f475e1/32.png) [@shriharip](https://forum.ionicframework.com/u/shriharip)\
**Post date:** [February 23, 2018, 8:34pm UTC](https://forum.ionicframework.com/t/ionic-build-failed-on-android/122454/3 "2018-02-23T20:34:14Z")

</div>

Hi @clockwise , thanks for the response. I added cordova-android@6.4.0 to my package json, but still gives me the error.

---

<div class="post-metadata">

**Author:** ![shriharip](https://avatars.discourse-cdn.com/v4/letter/s/f475e1/32.png) [@shriharip](https://forum.ionicframework.com/u/shriharip)\
**Post date:** [February 24, 2018, 7:20am UTC](https://forum.ionicframework.com/t/ionic-build-failed-on-android/122454/4 "2018-02-24T07:20:50Z")

</div>

Ionics, any pointers? @aaronksaunders any help 🙂

---

<div class="post-metadata">

**Author:** ![demokumar](https://avatars.discourse-cdn.com/v4/letter/d/6de8d8/32.png) [@demokumar](https://forum.ionicframework.com/u/demokumar)\
**Post date:** [February 24, 2018, 7:29am UTC](https://forum.ionicframework.com/t/ionic-build-failed-on-android/122454/5 "2018-02-24T07:29:15Z")

</div>

hello @shriharip  
refer this link [https://stackoverflow.com/questions/36568423/cordova-build-run-failed-compiledebugjavawithjavac](https://stackoverflow.com/questions/36568423/cordova-build-run-failed-compiledebugjavawithjavac)  
hope so this helps u 🙂

---

<div class="post-metadata">

**Author:** ![shriharip](https://avatars.discourse-cdn.com/v4/letter/s/f475e1/32.png) [@shriharip](https://forum.ionicframework.com/u/shriharip)\
**Post date:** [February 24, 2018, 8:42am UTC](https://forum.ionicframework.com/t/ionic-build-failed-on-android/122454/6 "2018-02-24T08:42:18Z")

</div>

Hi @demokumar,  
I tried the suggestion, but still facing the same issue.

---

<div class="post-metadata">

**Author:** ![cedrickd](https://avatars.discourse-cdn.com/v4/letter/c/71e660/32.png) [@cedrickd](https://forum.ionicframework.com/u/cedrickd)\
**Post date:** [February 26, 2018, 4:15am UTC](https://forum.ionicframework.com/t/ionic-build-failed-on-android/122454/7 "2018-02-26T04:15:33Z")

</div>

I’m currently facing this issue and only happened when I added the background location plugins. Same errors on my end.

---

<div class="post-metadata">

**Author:** ![shriharip](https://avatars.discourse-cdn.com/v4/letter/s/f475e1/32.png) [@shriharip](https://forum.ionicframework.com/u/shriharip)\
**Post date:** [February 26, 2018, 8:20am UTC](https://forum.ionicframework.com/t/ionic-build-failed-on-android/122454/8 "2018-02-26T08:20:25Z")

</div>

@cedrickd thanks for that input . I checked the plugin issues again today and found a solution .

[https://github.com/mauron85/cordova-plugin-background-geolocation/issues/362](https://github.com/mauron85/cordova-plugin-background-geolocation/issues/362) check this out.

---

<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:49pm UTC](https://forum.ionicframework.com/t/ionic-build-failed-on-android/122454/9 "2021-07-19T21:49:45Z")

</div>


