4

i am getting following error while run "ionic build android"

can help me out of this

Running command: /Users/tapan/Desktop/Today/hooks/after_prepare/010_add_platform_class.js /Users/tapan/Desktop/Today
add to body class: platform-android
ANDROID_HOME=/Users/tapan/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_45.jdk/Contents/Home
:preBuild UP-TO-DATE
:preDebugBuild UP-TO-DATE
:checkDebugManifest
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:compileDebugNdk UP-TO-DATE
:CordovaLib:compileLint
:CordovaLib:copyDebugLint UP-TO-DATE
:CordovaLib:mergeDebugProguardFiles UP-TO-DATE
:CordovaLib:packageDebugRenderscript UP-TO-DATE
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugRenderscript UP-TO-DATE
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources UP-TO-DATE
:CordovaLib:compileDebugAidl UP-TO-DATE
:CordovaLib:generateDebugBuildConfig UP-TO-DATE
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets UP-TO-DATE
:CordovaLib:processDebugManifest UP-TO-DATE
:CordovaLib:processDebugResources UP-TO-DATE
:CordovaLib:generateDebugSources UP-TO-DATE
:CordovaLib:compileDebugJavaWithJavac UP-TO-DATE
:CordovaLib:processDebugJavaRes UP-TO-DATE
:CordovaLib:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug UP-TO-DATE
:CordovaLib:mergeDebugJniLibFolders UP-TO-DATE
:CordovaLib:transformNative_libsWithMergeJniLibsForDebug UP-TO-DATE
:CordovaLib:transformNative_libsWithSyncJniLibsForDebug UP-TO-DATE
:CordovaLib:bundleDebug UP-TO-DATE
:prepareAndroidCordovaLibUnspecifiedDebugLibrary UP-TO-DATE
:prepareDebugDependencies
:compileDebugAidl UP-TO-DATE
:compileDebugRenderscript UP-TO-DATE
:generateDebugBuildConfig UP-TO-DATE
:generateDebugAssets UP-TO-DATE
:mergeDebugAssets UP-TO-DATE
:generateDebugResValues UP-TO-DATE
:generateDebugResources UP-TO-DATE
:mergeDebugResources UP-TO-DATE
:processDebugManifest UP-TO-DATE
:processDebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Users/tapan/Library/Android/sdk/build-tools/23.0.2/aapt'' finished with non-zero exit value 1

* 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: 1.926 secs
ERROR building one of the platforms: Error code 1 for command: /Users/tapan/Desktop/Today/platforms/android/gradlew with args: cdvBuildDebug,-b,/Users/tapan/Desktop/Today/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/tapan/Desktop/Today/platforms/android/gradlew with args: cdvBuildDebug,-b,/Users/tapan/Desktop/Today/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Pandroid.useDeprecatedNdk=true

also see snapshot

enter image description here

i have tried almost everything thing but not find how to build this android app,i also have removed android project and again create new android project, but still same error

ionic platform rm android
ionic platform add android

please help me

seenukarthi
  • 8,241
  • 10
  • 47
  • 68
Tapan Bavaliya
  • 135
  • 2
  • 12
  • I have the same problem. Yesterday everything was good – Billy Logan Mar 04 '16 at 09:31
  • Same problem for me. Since this is a recent problem, I assume it's based on a package update, but unfortunately today is the first day I've tried to an android build. Do you have any idea what packages you updated since yesterday @BillyLogan? – Pat Zabawa Mar 07 '16 at 03:06
  • same problem with me. i am using ubuntu 14.04 LTS , have you found any solution. my project was working perfect, but for some HW issue i have to format my pc. and after that BOOM. . i can run **ionic serve** but can't run ionic build android or ionic run android – Chirag thaker Aug 01 '16 at 05:45

2 Answers2

1

In my case (Fedora 23 x64) I had to install the following packages:

dnf install glibc.i686 zlib.i686 libstdc++.i686

Found that out because the execution of android-sdk-linux/build-tools/23.0.2/aapt gave me some errors.

Sources:

http://www.howtodoityourself.org/how-to-fix-libld-linux-so-2-bad-elf-interpreter-no-such-file-or-directory.html

android-sdks/build-tools/17.0.0/aapt: error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory

Community
  • 1
  • 1
thxxxx
  • 161
  • 1
  • 4
0

Maybe some of the packages may not be installed in SDK manager. Check the below link for more details:

http://developer.android.com/sdk/installing/adding-packages.html

user3109801
  • 41
  • 2
  • 11