Application not working when installing LocalNotification plugin - ionic-framework

my app was running fine until i installed Local Notifications native plugin:
I executed this command : ionic cordova plugin add cordova-plugin-local-notification
then this one npm install --save #ionic-native/local-notifications
Then i added import { LocalNotifications } from '#ionic-native/local-notifications'; on app.module.ts
Then i added LocalNotifications on the provider part of NgModule
Then i added import { LocalNotifications } from '#ionic-native/local-notifications'; on my home.ts
Then i added public localNotifications: LocalNotifications, to the constructor parameter
Then i tried to run the app and it dont wanna build, here's the log:
$ ionic cordova run android --target=95142bf1
Running app-scripts build: --platform android --target cordova
[01:14:05] build dev started ...
[01:14:05] clean started ...
[01:14:05] clean finished in 15 ms
[01:14:05] copy started ...
[01:14:05] deeplinks started ...
[01:14:05] deeplinks finished in 171 ms
[01:14:05] transpile started ...
[01:14:10] transpile finished in 5.13 s
[01:14:10] preprocess started ...
[01:14:10] preprocess finished in 15 ms
[01:14:10] webpack started ...
[01:14:11] copy finished in 5.79 s
[01:14:18] webpack finished in 8.11 s
[01:14:18] sass started ...
Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this w arning.
[01:14:20] sass finished in 1.81 s
[01:14:20] postprocess started ...
[01:14:20] postprocess finished in 31 ms
[01:14:20] lint started ...
[01:14:20] build dev finished in 15.49 s
> cordova run android --target 95142bf1
Android Studio project detected
ANDROID_HOME=C:\Users\Win 7\AppData\Local\Android\Sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_161
studio
Subproject Path: CordovaLib
Subproject Path: app
publishNonDefault is deprecated and has no effect anymore. All variants are now published.
Configuration 'compile' in project ':app' is deprecated. Use 'implementation' in stead.
The Task.leftShift(Closure) method has been deprecated and is scheduled to be re moved in Gradle 5.0. Please use Task.doLast(Action) instead.
at build_85bbhcbf5ogx3eqe0v2ws0it5.run(C:\Users\Win 7\Desktop\ThePfe\pfe z\platforms\android\app\build.gradle:146)
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:compileDebugAidl
UP-TO-DATE
:CordovaLib:compileDebugRenderscript
UP-TO-DATE
:CordovaLib:checkDebugManifest UP-TO-DATE
:CordovaLib:generateDebugBuildConfig UP-TO-DATE
:CordovaLib:prepareLintJar
UP-TO-DATE
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources UP-TO-DATE
:CordovaLib:platformAttrExtractor UP-TO-DATE
:CordovaLib:processDebugManifest
UP-TO-DATE
:CordovaLib:processDebugResources UP-TO-DATE
:CordovaLib:generateDebugSources UP-TO-DATE
:CordovaLib:javaPreCompileDebug UP-TO-DATE
:CordovaLib:compileDebugJavaWithJavac
UP-TO-DATE
:CordovaLib:processDebugJavaRes
NO-SOURCE
:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug
UP-TO-DATE
:app:preBuild UP-TO-DATE
:app:preDebugBuild
:app:compileDebugAidl
UP-TO-DATE
:CordovaLib:packageDebugRenderscript NO-SOURCE
:app:compileDebugRenderscript UP-TO-DATE
:app:checkDebugManifest UP-TO-DATE
:app:generateDebugBuildConfig
UP-TO-DATE
:app:prepareLintJar UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources
Error: Could not delete path 'C:\Users\Win 7\Desktop\ThePfe\pfez\platforms\andro id\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values-pa- rIN'.
:app:mergeDebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute meta-data#android.support.VERSION#value value=(25.4.0) from [com.android.support:appcompat-v7:25.4.0] AndroidManifest.xml:28:13-35
is also present at [com.android.support:support-v4:26.1.0] AndroidManifest.xml:28:13-35 value=(26.1.0).
Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:26:9-28:38 to override.
* 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 3s
23 actionable tasks: 1 executed, 22 up-to-date
(node:5844) UnhandledPromiseRejectionWarning: Error: cmd: Command failed with exit code 1 Error output:
C:\Users\Win 7\Desktop\ThePfe\pfez\platforms\android\app\src\main\AndroidManifest.xml:28:13-35 Error:
Attribute meta-data#android.support.VERSION#value value=(25.4.0) from [com.android.support:appcompat-v7:25.4.0] AndroidManifest.xml:28:13-35
is also present at [com.android.support:support-v4:26.1.0] AndroidManifest.xml:28:13-35 value=(26.1.0).
Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:26:9-28:38 to override.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute meta-data#android.support.VERSION#value value=(25.4.0) from [com.android.support:appcompat-v7:25.4.0] AndroidManifest.xml:28:13-35
is also present at [com.android.support:support-v4:26.1.0] AndroidManifest.xml:28:13-35 value=(26.1.0).
Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:26:9-28:38 to override.
* 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 3s
at ChildProcess.whenDone (C:\Users\Win 7\Desktop\ThePfe\pfez\platforms\android\cordova\node_modules\cordova-common\src\superspawn.js:169:23)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
(node:5844) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:5844) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[OK] Your app has been deployed.
Did you know you can live-reload changes from your app with --livereload?
I even tried to make a brand new blank project, i installed the plugin and added what needs to be added to app.module.ts and it didnt work either

Error: Could not delete path 'C:\Users\Win7\Desktop\ThePfe\pfez\platforms\andro...
Seems like it could be a permissions problem that your user may not have for the particular directory/file being deleted
EDIT:
Looks like you have a plugin conflict somewhere
Manifest merger failed : Attribute meta-data#android.support.VERSION#value value=(25.4.0) from [com.android.support:appcompat-v7:25.4.0] AndroidManifest.xml:28:13-35
is also present at [com.android.support:support-v4:26.1.0] AndroidManifest.xml:28:13-35 value=(26.1.0).
Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:26:9-28:38 to override.
Indicates that you have multiple references in your plugins to the support library, but the versions they require don't match.

I tried to make a new projet installing only this plugin and it didnt work, so i guess problem has something to do with the plugin itself

Related

jenkins unity gradle build failed (with firebase)

I'm using Unity 2021.3(LTS)
OS is Windows 10
Originally, the Unity Building with Jenkins worked well.
However, Gradle Failed error occurred after installing Firebase SDK.
But in Unity Editor, the build works fine.
What's the setup for Jenkins?
*** Tundra build success (100.30 seconds - 0:01:40), 899 items updated, 5791 evaluated
DisplayProgressbar: Calling IPostGenerateGradleAndroidProject callbacks
Android PostProcess task "Calling IPostGenerateGradleAndroidProject callbacks" took 11.7519 ms
Android PostProcess task "Performance Reporting Symbol Upload" took 0.1469 ms
DisplayProgressbar: Building Gradle project
Starting a Gradle Daemon, 1 incompatible and 10 stopped Daemons could not be reused, use --status for details
> Configure project :launcher
WARNING: The option setting 'android.enableR8=false' is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8
Note: Recompile with -Xlint:deprecation for details.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':launcher:processDebugResources'.
> Could not resolve all files for configuration ':launcher:debugRuntimeClasspath'.
> Failed to transform androidx.core.core-1.2.0-.aar (:androidx.core.core-1.2.0:) to match attributes {artifactType=android-compiled-dependencies-resources, org.gradle.status=integration}.
CommandInvokationFailure: Gradle build failed.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 20s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
]
stdout[
Starting a Gradle Daemon, 1 incompatible and 10 stopped Daemons could not be reused, use --status for details
> Configure project :launcher
WARNING: The option setting 'android.enableR8=false' is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8

Build works on local but fails on codemagic | Execution failed for task ':app:stripDebugDebugSymbols'

I'm trying to implement a continuous deployment system to build my app and deploy to Google Play using codemagic. Doing a build works fine locally but fails remotely on codemagic.
Error summary:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:stripDebugDebugSymbols'.
> 1 exception was raised by workers:
org.gradle.process.internal.ExecException: A problem occurred starting process 'command '/usr/local/share/android-sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-strip''
Complete log:
== Building for Android ==
> flutter build appbundle --debug
Running "flutter pub get" in My_Project... 1,655ms
💪 Building with sound null safety 💪
Running Gradle task 'bundleDebug'...
[flutter_background_geolocation] Purging debug resources in release build
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/builder/programs/flutter_2_5_3/.pub-cache/hosted/pub.dartlang.org/geocoding-2.0.1/android/src/main/java/com/baseflow/geocoding/GeocodingPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:stripDebugDebugSymbols'.
> 1 exception was raised by workers:
org.gradle.process.internal.ExecException: A problem occurred starting process 'command '/usr/local/share/android-sdk/ndk/23.1.7779620/toolchains/llvm/prebuilt/darwin-x86_64/bin/arm-linux-androideabi-strip''
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 2m 19s
Running Gradle task 'bundleDebug'... 141.1s
Gradle task bundleDebug failed with exit code 1
Build failed :|
Failed to build for Android
Current configuration on codemagic:
Flutter channel: stable
Mode: debug
Build for: Android
to fix this you need to upgrade Gradle version in android/gradle/wrapper/gradle-wrapper.properties to 6.7.1 or commit gradle wrapper to your repository if you don't have this file.
Additional to that you also might need to upgrade Android Gradle plugin in andriod/build.gradle
- classpath 'com.android.tools.build:gradle:3.5.4'
+ classpath 'com.android.tools.build:gradle:4.2.0'
WITHOUT GRADLE UPGRADE
if for some reasons you can't upgrade Gradle version you can freeze previous NDK version.
For that you can specify ndkVersion "22.1.7171670" in your build.gradle and make sure you use Java 1.8 since there is an issue with using latest Java versions.
In Codemagic you can specify Java version in environment section in your codemagic.yaml like this
workflows:
workflow-name:
environment:
ndk: r22b
java: 1.8

Can build app in debug mode but not in release mode Flutter

I am facing following error in console when running in release mode.
C:\Users\Bilal Saeed\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\google_maps_flutter-2.1.0\android\src\main\java\io\flutter\plugins\googlemaps\Googl
eMapsPlugin.java:19: error: cannot find symbol
import io.flutter.embedding.engine.plugins.lifecycle.FlutterLifecycleAdapter;
^
symbol: class FlutterLifecycleAdapter
location: package io.flutter.embedding.engine.plugins.lifecycle
C:\Users\Bilal Saeed\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\google_maps_flutter-2.1.0\android\src\main\java\io\flutter\plugins\googlemaps\Googl
eMapsPlugin.java:92: error: cannot find symbol
lifecycle = FlutterLifecycleAdapter.getActivityLifecycle(binding);
^
symbol: variable FlutterLifecycleAdapter
location: class GoogleMapsPlugin
Note: C:\Users\Bilal Saeed\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\google_maps_flutter-2.1.0\android\src\main\java\io\flutter\plugins\googlemaps
\Convert.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\Users\Bilal Saeed\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\google_maps_flutter-2.1.0\android\src\main\java\io\flutter\plugins\googlemaps
\TileProviderController.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':google_maps_flutter:compileReleaseJavaWithJavac'.
> 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. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 3m 14s
Running Gradle task 'assembleRelease'... 195.8s
Gradle task assembleRelease failed with exit code 1
What I have tried so far.
Added this line to gradle.properties.
org.gradle.jvmargs=-Xmx4608m
In Android Studio
File > Invalidate Caches/Restart...
Deleted the complete pub_cache folder.
Restarted my Android Studio.
Ran flutter clean, flutter pub get, flutter upgrade.
Ran flutter pub cache repair command also.
But no solution worked.
What worked for me might help some one else.
1. Delete .gradle file present in android folder of project.
2. Update classpath in project level build.gradle file by hovering over it to the latest version.
3. Upgraded distribution URL in gradle-wrapper.properties
4. Clicked File/Invalidate Caches & restart option.
And it started to release my app once again.

uber dependency compiling error - Android

On adding this line of code to build.gradle
compile 'com.uber.sdk:rides-android:0.5.3'
It shows an error when the project is building
Error:Execution failed for task ':app:prepareDebugAndroidTestDependencies'. > Dependency Error. See console for details.
the error log from gradle console
Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies]Configuration on demand is an incubating feature.
WARNING: WARNING: Dependency org.apache.httpcomponents:httpclient:4.0.1 is ignored for debug as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
WARNING: WARNING: Dependency org.apache.httpcomponents:httpclient:4.0.1 is ignored for debug as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
WARNING: WARNING: Dependency org.apache.httpcomponents:httpclient:4.0.1 is ignored for release as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
WARNING: WARNING: Dependency org.apache.httpcomponents:httpclient:4.0.1 is ignored for release as it may be conflicting with the internal version provided by Android.
In case of problem, please repackage it with jarjar to change the class packages
Incremental java compilation is an incubating feature.
WARNING: Conflict with dependency 'com.google.code.findbugs:jsr305'. Resolved versions for app (1.3.9) and test app (2.0.1) differ. See http://g.co/androidstudio/app-test-app-conflict for details.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2500Library UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72500Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCompat2500Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCoreUi2500Library UP-TO-DATE
:app:prepareComAndroidSupportSupportCoreUtils2500Library UP-TO-DATE
:app:prepareComAndroidSupportSupportFragment2500Library UP-TO-DATE
:app:prepareComAndroidSupportSupportMediaCompat2500Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42500Library UP-TO-DATE
:app:prepareComAndroidSupportSupportVectorDrawable2500Library UP-TO-DATE
:app:prepareComUberSdkCoreAndroid053Library UP-TO-DATE
:app:prepareComUberSdkRidesAndroid053Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:preDebugAndroidTestBuild UP-TO-DATE
:app:prepareComAndroidSupportTestEspressoEspressoCore222Library
:app:prepareComAndroidSupportTestEspressoEspressoIdlingResource222Library
:app:prepareComAndroidSupportTestExposedInstrumentationApiPublish05Library
:app:prepareComAndroidSupportTestRules05Library
:app:prepareComAndroidSupportTestRunner05Library
:app:prepareDebugAndroidTestDependencies
Conflict with dependency 'com.google.code.findbugs:jsr305'. Resolved versions for app (1.3.9) and test app (2.0.1) differ. See http://g.co/androidstudio/app-test-app-conflict for details.
FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:prepareDebugAndroidTestDependencies'.
Dependency Error. See console for details.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Please help
I got it fixed by force the com.google.findbugs to use a lower version

"ionic build android" build failed

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
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
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
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