# Build Failed ionic v1 linux

**URL:** <https://forum.ionicframework.com/t/build-failed-ionic-v1-linux/112306>\
**Category:** ionic-v1\
**Created:** [November 15, 2017, 10:23pm UTC](https://forum.ionicframework.com/t/build-failed-ionic-v1-linux/112306 "2017-11-15T22:23:17Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![imadaboulhouda](https://avatars.discourse-cdn.com/v4/letter/i/a5b964/32.png) [@imadaboulhouda](https://forum.ionicframework.com/u/imadaboulhouda)\
**Post date:** [November 15, 2017, 10:23pm UTC](https://forum.ionicframework.com/t/build-failed-ionic-v1-linux/112306/1 "2017-11-15T22:23:17Z")

</div>

I have problem with an exception

```auto
Running command: /home/jocker/Desktop/appMobile/app/hooks/after_prepare/010_add_platform_class.js /home/jocker/Desktop/appMobile/app
add to body class: platform-android
ANDROID_HOME=/home/jocker/Downloads/android-sdk-linux
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-i386
:preBuild
:compileDebugNdk UP-TO-DATE
:preDebugBuild
:checkDebugManifest
:CordovaLib:compileLint
:CordovaLib:copyDebugLint UP-TO-DATE
:CordovaLib:mergeDebugProguardFiles UP-TO-DATE
:CordovaLib:preBuild
:CordovaLib:preDebugBuild
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugAidl UP-TO-DATE
:CordovaLib:compileDebugRenderscript UP-TO-DATE
:CordovaLib:generateDebugBuildConfig UP-TO-DATE
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets UP-TO-DATE
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources UP-TO-DATE
:CordovaLib:processDebugManifest UP-TO-DATE
:CordovaLib:processDebugResources
/home/jocker/Downloads/android-sdk-linux/build-tools/27.0.1/aapt: 1: /home/jocker/Downloads/android-sdk-linux/build-tools/27.0.1/aapt: Syntax error: "(" unexpected
:CordovaLib:processDebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':CordovaLib:processDebugResources'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
  	/home/jocker/Downloads/android-sdk-linux/build-tools/27.0.1/aapt package -f --no-crunch -I /home/jocker/Downloads/android-sdk-linux/platforms/android-23/android.jar -M /home/jocker/Desktop/appMobile/app/platforms/android/CordovaLib/build/intermediates/bundles/debug/AndroidManifest.xml -S /home/jocker/Desktop/appMobile/app/platforms/android/CordovaLib/build/intermediates/bundles/debug/res -A /home/jocker/Desktop/appMobile/app/platforms/android/CordovaLib/build/intermediates/bundles/debug/assets -m -J /home/jocker/Desktop/appMobile/app/platforms/android/CordovaLib/build/generated/source/r/debug --debug-mode --custom-package org.apache.cordova --non-constant-id -0 apk --output-text-symbols /home/jocker/Desktop/appMobile/app/platforms/android/CordovaLib/build/intermediates/bundles/debug
  Error Code:
  	2
  Output:
  	/home/jocker/Downloads/android-sdk-linux/build-tools/27.0.1/aapt: 1: /home/jocker/Downloads/android-sdk-linux/build-tools/27.0.1/aapt: Syntax error: "(" unexpected

* 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: 23.749 secs
Error: /home/jocker/Desktop/appMobile/app/platforms/android/gradlew: Command failed with exit code 1

```

Help me please

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [November 15, 2017, 10:34pm UTC](https://forum.ionicframework.com/t/build-failed-ionic-v1-linux/112306/2 "2017-11-15T22:34:49Z")

</div>

What is your `ionic info` output?

---

<div class="post-metadata">

**Author:** ![imadaboulhouda](https://avatars.discourse-cdn.com/v4/letter/i/a5b964/32.png) [@imadaboulhouda](https://forum.ionicframework.com/u/imadaboulhouda)\
**Post date:** [November 15, 2017, 10:38pm UTC](https://forum.ionicframework.com/t/build-failed-ionic-v1-linux/112306/3 "2017-11-15T22:38:18Z")

</div>

Thanks for answer

```auto

root@jocker-TM8473:/home/jocker/Desktop/appMobile/app# ionic info
[WARN] Error with ./www/lib/ionic/version.json file: FILE_NOT_FOUND, trying 
       ./bower.json.
[WARN] Error with ./www/lib/ionic/version.json file: FILE_NOT_FOUND, trying 
       ./bower.json.

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils : 1.18.0
    ionic (Ionic CLI) : 3.18.0

global packages:

    cordova (Cordova CLI) : 7.1.0 
    Gulp CLI : CLI version 3.9.1 Local version 3.9.1

local packages:

    Cordova Platforms : android 5.0.0
    Ionic Framework : ionic1 1.3.4

System:

    Android SDK Tools : 25.2.5
    Node : v8.6.0
    npm : 5.3.0 
    OS : Linux 4.10

Environment Variables:

    ANDROID_HOME : /home/jocker/Downloads/android-sdk-linux

Misc:

    backend : pro
```

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [November 15, 2017, 10:43pm UTC](https://forum.ionicframework.com/t/build-failed-ionic-v1-linux/112306/4 "2017-11-15T22:43:43Z")

</div>

> [@imadaboulhouda](#):
>
> Cordova Platforms : android 5.0.0

That is ancient. Current is 6.4.0.

---

<div class="post-metadata">

**Author:** ![imadaboulhouda](https://avatars.discourse-cdn.com/v4/letter/i/a5b964/32.png) [@imadaboulhouda](https://forum.ionicframework.com/u/imadaboulhouda)\
**Post date:** [November 15, 2017, 10:53pm UTC](https://forum.ionicframework.com/t/build-failed-ionic-v1-linux/112306/5 "2017-11-15T22:53:51Z")

</div>

But i want build android 5.0.0

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [November 15, 2017, 11:02pm UTC](https://forum.ionicframework.com/t/build-failed-ionic-v1-linux/112306/6 "2017-11-15T23:02:14Z")

</div>

You are aware that cordova-android, what you are seeing here, has nothing to do with the Android version?  
[https://cordova.apache.org/docs/en/7.x/guide/platforms/android/index.html#requirements-and-support](https://cordova.apache.org/docs/en/7.x/guide/platforms/android/index.html#requirements-and-support)

---

<div class="post-metadata">

**Author:** ![imadaboulhouda](https://avatars.discourse-cdn.com/v4/letter/i/a5b964/32.png) [@imadaboulhouda](https://forum.ionicframework.com/u/imadaboulhouda)\
**Post date:** [November 15, 2017, 11:09pm UTC](https://forum.ionicframework.com/t/build-failed-ionic-v1-linux/112306/7 "2017-11-15T23:09:43Z")

</div>

i changed version and the some problem

this is ionic info output

```auto

root@jocker-TM8473:/home/jocker/Desktop/appMobile/app# ionic info
[WARN] Error with ./www/lib/ionic/version.json file: FILE_NOT_FOUND, trying ./bower.json.

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils : 1.18.0
    ionic (Ionic CLI) : 3.18.0

global packages:

    cordova (Cordova CLI) : 7.1.0 
    Gulp CLI : CLI version 3.9.1 Local version 3.9.1

local packages:

    Cordova Platforms : android 6.3.0
    Ionic Framework : ionic1 1.3.4

System:

    Android SDK Tools : 25.2.5
    Node : v8.6.0
    npm : 5.3.0 
    OS : Linux 4.10

Environment Variables:

    ANDROID_HOME : /home/jocker/Downloads/android-sdk-linux

Misc:

    backend : pro

```

this is error

```auto

root@jocker-TM8473:/home/jocker/Desktop/appMobile/app# cordova platform add android
Using cordova-fetch for cordova-android@~6.3.0
Adding android project...
Creating Cordova project for the Android platform:
	Path: platforms/android
	Package: io.ionic.starter
	Name: MyApp
	Activity: MainActivity
	Android target: android-26
Subproject Path: CordovaLib
Android project created with cordova-android@6.3.0
Installing "cordova-plugin-compat" for android
Plugin doesn't support this project's cordova-android version. cordova-android: 6.3.0, failed version requirement: 
      <6.3.0
Skipping 'cordova-plugin-compat' for android
Installing "cordova-plugin-device" for android
Installing "cordova-plugin-geolocation" for android
Plugin dependency "cordova-plugin-compat@1.2.0" already fetched, using that version.
Installing "cordova-plugin-compat" for android
Plugin doesn't support this project's cordova-android version. cordova-android: 6.3.0, failed version requirement: 
      <6.3.0
Skipping 'cordova-plugin-compat' for android
Installing "cordova-plugin-splashscreen" for android
Installing "cordova-plugin-statusbar" for android
Installing "cordova-plugin-whitelist" for android

               This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.
          
Installing "ionic-plugin-keyboard" for android
Running command: /home/jocker/Desktop/appMobile/app/hooks/after_prepare/010_add_platform_class.js /home/jocker/Desktop/appMobile/app
add to body class: platform-android
--save flag or autosave detected
Saving android@~6.3.0 into config.xml file ...
root@jocker-TM8473:/home/jocker/Desktop/appMobile/app# cordova build android
Running command: /home/jocker/Desktop/appMobile/app/hooks/after_prepare/010_add_platform_class.js /home/jocker/Desktop/appMobile/app
add to body class: platform-android
ANDROID_HOME=/home/jocker/Downloads/android-sdk-linux
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-i386
Starting a Gradle Daemon (subsequent builds will be faster)
:wrapper

BUILD SUCCESSFUL

Total time: 12.226 secs
Subproject Path: CordovaLib
Starting a Gradle Daemon (subsequent builds will be faster)
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
	at build_cw96kx1r15mxq0kngf7yt0jry.run(/home/jocker/Desktop/appMobile/app/platforms/android/build.gradle:141)
The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.
Incremental java compilation is an incubating feature.
The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.
:preBuild UP-TO-DATE
:preDebugBuild UP-TO-DATE
:checkDebugManifest
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugAidl
:CordovaLib:compileDebugNdk UP-TO-DATE
:CordovaLib:compileLint
:CordovaLib:copyDebugLint UP-TO-DATE
:CordovaLib:mergeDebugShaders
:CordovaLib:compileDebugShaders
:CordovaLib:generateDebugAssets
:CordovaLib:mergeDebugAssets
:CordovaLib:mergeDebugProguardFiles
:CordovaLib:packageDebugRenderscript UP-TO-DATE
:CordovaLib:compileDebugRenderscript
:CordovaLib:generateDebugResValues
:CordovaLib:generateDebugResources
:CordovaLib:packageDebugResources
:CordovaLib:processDebugManifest
:CordovaLib:generateDebugBuildConfig
:CordovaLib:processDebugResources/home/jocker/Downloads/android-sdk-linux/build-tools/27.0.1/aapt: 1: /home/jocker/Downloads/android-sdk-linux/build-tools/27.0.1/aapt: Syntax error: "(" unexpected

 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':CordovaLib: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: 34.94 secs
Error: /home/jocker/Desktop/appMobile/app/platforms/android/gradlew: Command failed with exit code 1 Error output:
/home/jocker/Downloads/android-sdk-linux/build-tools/27.0.1/aapt: 1: /home/jocker/Downloads/android-sdk-linux/build-tools/27.0.1/aapt: Syntax error: "(" unexpected

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':CordovaLib: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.

```

---

<div class="post-metadata">

**Author:** ![imadaboulhouda](https://avatars.discourse-cdn.com/v4/letter/i/a5b964/32.png) [@imadaboulhouda](https://forum.ionicframework.com/u/imadaboulhouda)\
**Post date:** [November 15, 2017, 11:36pm UTC](https://forum.ionicframework.com/t/build-failed-ionic-v1-linux/112306/8 "2017-11-15T23:36:31Z")

</div>

any solution for that

---

<div class="post-metadata">

**Author:** ![Sujan12](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/sujan12/32/108395_2.png) [@Sujan12](https://forum.ionicframework.com/u/Sujan12)\
**Post date:** [November 16, 2017, 9:09am UTC](https://forum.ionicframework.com/t/build-failed-ionic-v1-linux/112306/9 "2017-11-16T09:09:57Z")

</div>

Read this: [Android build broken after gradle dependencies update: Execution failed for task ':processDebugResources'. \> com.android.ide.common.process.ProcessException: Failed to execute aapt](https://forum.ionicframework.com/t/android-build-broken-after-gradle-dependencies-update-execution-failed-for-task-processdebugresources-com-android-ide-common-process-processexception-failed-to-execute-aapt/109982/1)

---

<div class="post-metadata">

**Author:** ![imadaboulhouda](https://avatars.discourse-cdn.com/v4/letter/i/a5b964/32.png) [@imadaboulhouda](https://forum.ionicframework.com/u/imadaboulhouda)\
**Post date:** [November 18, 2017, 3:00am UTC](https://forum.ionicframework.com/t/build-failed-ionic-v1-linux/112306/10 "2017-11-18T03:00:25Z")

</div>

hello not working for me

---

<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, 10:03pm UTC](https://forum.ionicframework.com/t/build-failed-ionic-v1-linux/112306/11 "2021-07-19T22:03:43Z")

</div>

Closed on July 19, 2021, 10:03pm UTC


