com.android.builder.testing.api.DeviceException: No connected devices - ubuntu-16.04

Scanning folders for symlinks in /home/sino/Desktop/we-clone/node_modules (4ms)
Starting JS server...
Building and installing the app on the device (cd android && ./gradlew installDebug)...
Incremental java compilation is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42301Library UP-TO-DATE
:app:prepareComFacebookFbuiTextlayoutbuilderTextlayoutbuilder100Library UP-TO-DATE
:app:prepareComFacebookFrescoDrawee130Library UP-TO-DATE
:app:prepareComFacebookFrescoFbcore130Library UP-TO-DATE
:app:prepareComFacebookFrescoFresco130Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipeline130Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipelineBase130Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipelineOkhttp3130Library UP-TO-DATE
:app:prepareComFacebookReactReactNative0493Library UP-TO-DATE
:app:prepareComFacebookSoloaderSoloader010Library UP-TO-DATE
:app:prepareOrgWebkitAndroidJscR174650Library UP-TO-DATE
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:mergeDebugShaders UP-TO-DATE
:app:compileDebugShaders UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:bundleDebugJsAndAssets SKIPPED
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:incrementalDebugJavaCompilationSafeguard UP-TO-DATE
:app:compileDebugJavaWithJavac UP-TO-DATE
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources UP-TO-DATE
:app:transformClassesWithDexForDebug UP-TO-DATE
:app:mergeDebugJniLibFolders UP-TO-DATE
:app:transformNative_libsWithMergeJniLibsForDebug UP-TO-DATE
:app:processDebugJavaRes UP-TO-DATE
:app:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
:app:validateSigningDebug
:app:packageDebug UP-TO-DATE
:app:assembleDebug UP-TO-DATE
:app:installDebug
07:52:34 E/adb: * daemon not running; starting now at tcp:5037
07:52:37 E/adb: * daemon started successfully
:app:installDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:installDebug'.
> com.android.builder.testing.api.DeviceException: No connected devices!
* 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: 8.916 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html

If you have android studio installed(if not install it) launch android studio with a dummy project, go to Tools -> AVD Manager. Make sure that you create a virtual device and start it.
Note: To create this virtual device you will need to download and install a compatible OS (compatible with your project's Android SDK version - SDK version can be found inside build.gradle file) on it before launching. AVD Manager will guide you with the process.
Another thing, you may be using a real Android device not an emulator and still get this message. If your device is connected through USB to your laptop you need to first enable the developer options:
If using stock Android, go to Settings > About phone > Build number.
On a Samsung Galaxy device, go to Settings > About device > Build
number. On an HTC device, go to Settings > About > Software
information > More > Build number. On an LG device, go to Settings >
About phone > Software info > Build number. Tap Build number seven
times. After the first few taps, you should see the steps counting
down until you unlock the developer options. Once activated, you will
see a message that reads, “You are now a developer!” Go back to
Settings, where you’ll find a Developer options entry in the menu.
(https://www.digitaltrends.com/mobile/how-to-get-developer-options-on-android/)
Then inside developer options, you should enable USB debugging.

You'll need to have an Android Emulator running or a physical device connected and in usb debugging mode.
See https://facebook.github.io/react-native/docs/getting-started.html#preparing-the-android-device for more information.

Version SDK incompatible check SDK version in build.gradle under android folder
For example
ext {
buildToolsVersion = "29.0.2"
minSdkVersion = 16
compileSdkVersion = 29
targetSdkVersion = 29
}
Then download ADV Manager
Select Image API Level 29 (Follow SDK version)

In my case, my usb wasn't connected for some reason, even though it seemed like it was physically connected. I had to change the ports I used.

Related

Application not working when installing LocalNotification plugin

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

How to run nativescript project in another visual studio code

I created android app using native script and i am using visual studio code.
so i want to run same project in another laptop using visual studio code.
so please tell me how to run because whenever i am trying to run project,its not able to build.
here is error:
E:\NS-APP\sample-ImageUpload-master>tns run android Skipping prepare.
Searching for devices... Building project...
Configuring > 0/3 projects > root project :config phase: createDefaultIncludeFiles
+found plugins: nativescript-background-http
+found plugins: nativescript-telerik-ui
+found plugins: tns-core-modules-widgets
:config phase: createPluginsConfigFile
Creating product flavors include.gradle file in E:\NS-APP\sample-ImageUpload-master\platforms\android/configurations
folder...
:config phase: pluginExtend
+applying configuration from: E:\NS-APP\sample-ImageUpload-master\platforms\android\configurations\include.gradle
+applying configuration from: E:\NS-APP\sample-ImageUpload-master\platforms\android\configurations\nativescript-background-http\include.gradle
+applying configuration from: E:\NS-APP\sample-ImageUpload-master\platforms\android\configurations\nativescript-telerik-ui\include.gradle
+applying configuration from: E:\NS-APP\sample-ImageUpload-master\platforms\android\configurations\tns-core-modules-widgets\include.gradle
Configuring > 0/3 projects > root project :config phase: addAarDependencies
+adding dependency: E:\NS-APP\sample-ImageUpload-master\platforms\android\libs\aar\Common-2017.1.222-dev-release.aar
+adding dependency: E:\NS-APP\sample-ImageUpload-master\platforms\android\libs\aar\Data-2017.1.222-dev-release.aar
+adding dependency: E:\NS-APP\sample-ImageUpload-master\platforms\android\libs\aar\List-2017.1.222-dev-release.aar
+adding dependency: E:\NS-APP\sample-ImageUpload-master\platforms\android\libs\aar\Primitives-2017.1.222-dev-release.aar
+adding dependency: E:\NS-APP\sample-ImageUpload-master\platforms\android\libs\aar\widgets-release.aar
The JavaCompile.setDependencyCacheDir() method has been deprecated and
is scheduled to be removed in Gradle 4.0. 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. Incremental java
compilation is an incubating feature. 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_1xv9gqucl7v9i0b8ti7pqf8cd.run(E:\NS-APP\sample-ImageUpload-master\platforms\android\build-tools\android-static-binding-generator\build.gradle:126)
:preBuild UP-TO-DATE :preF0F1F2DebugBuild UP-TO-DATE
:checkF0F1F2DebugManifest :preF0F1F2ReleaseBuild UP-TO-DATE
:prepareBackHttpAppRuntimeUnspecifiedLibrary UP-TO-DATE
:prepareComAndroidSupportAnimatedVectorDrawable2531Library UP-TO-DATE
:prepareComAndroidSupportAppcompatV72531Library UP-TO-DATE
:prepareComAndroidSupportDesign2531Library UP-TO-DATE
:prepareComAndroidSupportRecyclerviewV72531Library UP-TO-DATE
:prepareComAndroidSupportSupportCompat2531Library UP-TO-DATE
:prepareComAndroidSupportSupportCoreUi2531Library UP-TO-DATE
:prepareComAndroidSupportSupportCoreUtils2531Library UP-TO-DATE
:prepareComAndroidSupportSupportFragment2531Library UP-TO-DATE
:prepareComAndroidSupportSupportMediaCompat2531Library UP-TO-DATE
:prepareComAndroidSupportSupportV42531Library UP-TO-DATE
:prepareComAndroidSupportSupportVectorDrawable2531Library UP-TO-DATE
:prepareComAndroidSupportTransition2531Library UP-TO-DATE
:prepareCommon20171222DevReleaseLibrary UP-TO-DATE
:prepareData20171222DevReleaseLibrary UP-TO-DATE
:prepareList20171222DevReleaseLibrary UP-TO-DATE
:prepareNetGotevUploadservice303Library UP-TO-DATE
:preparePrimitives20171222DevReleaseLibrary UP-TO-DATE
:prepareWidgetsReleaseLibrary UP-TO-DATE
:prepareF0F1F2DebugDependencies :compileF0F1F2DebugAidl UP-TO-DATE
:compileF0F1F2DebugRenderscript UP-TO-DATE
:generateF0F1F2DebugBuildConfig UP-TO-DATE :cleanLocalAarFiles
:ensureMetadataOutDir :collectAllJars :setProperties
:generateTypescriptDefinitions SKIPPED :copyTypings SKIPPED
:asbg:generateInterfaceNamesList :asbg:traverseJsFiles
:asbg:runAstParser UP-TO-DATE :asbg:generateBindings Exception in
thread "main" java.io.IOException: File already exists. This may lead
to undesired behavior. Please change the name of one of the extended
classes.
E:\NS-APP\sample-ImageUpload-master\platforms\android\src\main\java\com\tns\gen\net\gotev\uploadservice\UploadServiceBroadcastReceiver_ftns_modules_nativescript_background_http_background_http_l6_c79__.java
at org.nativescript.staticbindinggenerator.Generator.writeBindings(Generator.java:60)
at org.nativescript.staticbindinggenerator.Main.main(Main.java:15)
:asbg:generateBindings FAILED
FAILURE: Build failed with an exception.
Where: Build file 'E:\NS-APP\sample-ImageUpload-master\platforms\android\build-tools\android-static-binding-generator\build.gradle'
line: 251
What went wrong: Execution failed for task ':asbg:generateBindings'.
Process 'command 'C:\Program Files\Java\jdk1.8.0_131\bin\java.exe'' 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: 14.86 secs Command
E:\NS-APP\sample-ImageUpload-master\platforms\android\gradlew.bat
failed with exit code 1
run android
┌────────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────┐
│ Usage │ Synopsis
│ │ Run on all connected │ $ tns run android [--key-store-path --key-store-password --key │ │ devices and running
│ -store-alias --key-store-alias-password ]
[--release] [--justlaunch] │ │ emulators │
│ │ Run on a selected │ $ tns run android --device
[--key-store-path --key-store │ │ connected device
or │ -password --key-store-alias
--key-store-alias-password ] [- │ │ running emulator │ -release] [--justlaunch] │ │ Start an emulator and │ $ tns run android --emulator [] [--key-store-path --key │ │ run the app inside
it │ -store-password --key-store-alias
--key-store-alias-password │ │ │ ] [--release] [--justlaunch]
│
└────────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────┘
Runs your project on a connected Android device or in a native Android
emulator, if configured. This is shorthand for prepare, build and
deploy. While your app is running, prints the output from the
application in the console and watches for changes in your code. Once
a change is detected, it synchronizes the change with all selected
devices and restarts/refreshes the application.
Options
* --no-watch - If set, changes in your code will not be reflected during the execution of this command.
* --device - Specifies a connected device/emulator on which to run the app.
* --emulator - If set, runs the app in a native emulator for the target platform, if configured. When set, you can also set any other
valid combination of emulator options as listed by $ tns help emulate
android.
* --release - If set, produces a release build. Otherwise, produces a debug build. When set, you must also specify the
--key-store-* options.
* --key-store-path - Specifies the file path to the keystore file (P12) which you want to use to code sign your APK. You can use the
--key-store-* options along with --release to produce a signed release build. You need to specify all --key-store-* options.
* --key-store-password - Provides the password for the keystore file specified with --key-store-path. You can use the --key-store-*
options along with --release to produce a signed release build. You
need to specify all --key-store-* options.
* --key-store-alias - Provides the alias for the keystore file specified with --key-store-path. You can use the --key-store-* options
along with --release to produce a signed release build. You need to
specify all --key-store-* options.
* --key-store-alias-password - Provides the password for the alias specified with --key-store-alias-password. You can use the
--key-store-* options along with --release to produce a signed release build. You need to specify all --key-store-* options.
* --justlaunch - If set, does not print the application output in the console.
* --clean - If set, forces rebuilding the native application.
Attributes
* <Device ID> is the index or name of the target device as listed by $ tns device android
* <Emulator Options> is any valid combination of options as listed by $ tns help emulate android
Sending exception report (press Ctrl+C to stop).....
Reset your entire project by deleting node_modules, platforms and hooks folders and then rebuild the project with tns build android or tns run android
You need not delete node_modules and hooks, just deleting platforms and rebuilding should be fine.
rm -rf platforms
tns run android

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

Ionic android build crashes at :processDebugResources

I'm still new in Ionic, so I programmed an App a few weeks ago, something went wrong and crash while using command "ionic build android".
"ionic serve" also doesn't work.
Here is the output of the build:
Running command: /home/USERNAME/IONIC_Workspace/local-business/hooks/after_prepareicons_and_splashscreens.js /home/USERNAME/IONIC_Workspace/local-business
Running command: /home/USERNAME/IONIC_Workspace/local-business/hooks/after_prepare/update_platform_config.js /home/USERNAME/IONIC_Workspace/local-business
Running command: /home/USERNAME/IONIC_Workspace/local-business/platforms/android/cordova/build
ANDROID_HOME=/home/USERNAME/Android/Sdk
JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
Running: /home/USERNAME/IONIC_Workspace/local-business/platforms/android/gradlew cdvBuildDebug -b /home/USERNAME/IONIC_Workspace/local-business/platforms/android/ build.gradle -Dorg.gradle.daemon=true
: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 UP-TO-DATE
:CordovaLib:generateDebugSources UP-TO-DATE
:CordovaLib:compileDebugJava UP-TO-DATE
:CordovaLib:processDebugJavaRes UP-TO-DATE
:CordovaLib:packageDebugJar UP-TO-DATE
:CordovaLib:compileDebugNdk UP-TO-DATE
:CordovaLib:packageDebugJniLibs UP-TO-DATE
:CordovaLib:packageDebugLocalJar UP-TO-DATE
:CordovaLib:packageDebugRenderscript UP-TO-DATE
:CordovaLib:bundleDebug UP-TO-DATE
:prepareAndroidCordovaLibUnspecifiedDebugLibrary UP-TO-DATE
:preReleaseBuild
:CordovaLib:copyReleaseLint UP-TO-DATE
:CordovaLib:mergeReleaseProguardFiles UP-TO-DATE
:CordovaLib:preReleaseBuild
:CordovaLib:checkReleaseManifest
:CordovaLib:prepareReleaseDependencies
:CordovaLib:compileReleaseAidl UP-TO-DATE
:CordovaLib:compileReleaseRenderscript UP-TO-DATE
:CordovaLib:generateReleaseBuildConfig UP-TO-DATE
:CordovaLib:generateReleaseAssets UP-TO-DATE
:CordovaLib:mergeReleaseAssets UP-TO-DATE
:CordovaLib:generateReleaseResValues UP-TO-DATE
:CordovaLib:generateReleaseResources UP-TO-DATE
:CordovaLib:packageReleaseResources UP-TO-DATE
:CordovaLib:processReleaseManifest UP-TO-DATE
:CordovaLib:processReleaseResources UP-TO-DATE
:CordovaLib:generateReleaseSources UP-TO-DATE
:CordovaLib:compileReleaseJava UP-TO-DATE
:CordovaLib:processReleaseJavaRes UP-TO-DATE
:CordovaLib:packageReleaseJar UP-TO-DATE
:CordovaLib:compileReleaseNdk UP-TO-DATE
:CordovaLib:packageReleaseJniLibs UP-TO-DATE
:CordovaLib:packageReleaseLocalJar UP-TO-DATE
:CordovaLib:packageReleaseRenderscript UP-TO-DATE
:CordovaLib:bundleRelease UP-TO-DATE
:prepareComAndroidSupportSupportV132311Library UP-TO-DATE
:prepareComAndroidSupportSupportV42311Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesBase830Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesBasement830Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesGcm830Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesMeasurement830Library 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
/home/USERNAME/IONIC_Workspace/local-business/platforms/android/build/intermediates/assets/debug/www/node_modules/ionic/node_modules/ionic-app-lib/node_modules/archiver/node_modules/file-utils/node_modules/isbinaryfile/tests/fixtures/03_Руководство_по_эксплуатации.rst: error: Invalid filename. Unable to add.
:processDebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processDebugResources'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
/home/USERNAME/Android/Sdk/build-tools/23.0.2/aapt package -f --no-crunch -I /home/USERNAME/Android/Sdk/platforms/android-22/android.jar -M /home/USERNAME/IONIC_Workspace/local-business/platforms/android/build/intermediates/manifests/full/debug/AndroidManifest.xml -S /home/USERNAME/IONIC_Workspace/local-business/platforms/android/build/intermediates/res/debug -A /home/USERNAME/IONIC_Workspace/local-business/platforms/android/build/intermediates/assets/debug -m -J /home/USERNAME/IONIC_Workspace/local-business/platforms/android/build/generated/source/r/debug -F /home/USERNAME/IONIC_Workspace/local-business/platforms/android/build/intermediates/res/resources-debug.ap_ --debug-mode --custom-package com.titaniumtemplates.local_business -0 apk --output-text-symbols /home/USERNAME/IONIC_Workspace/local-business/platforms/android/build/intermediates/symbols/debug
Error Code:
1
Output:
/home/USERNAME/IONIC_Workspace/local-business/platforms/android/build/intermediates/assets/debug/www/node_modules/ionic/node_modules/ionic-app-lib/node_modules/archiver/node_modules/file-utils/node_modules/isbinaryfile/tests/fixtures/03_Руководство_по_эксплуатации.rst: error: Invalid filename. Unable to add.
* 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: 8.208 secs
/home/USERNAME/IONIC_Workspace/local-business/platforms/android/cordova/node_modules/q/q.js:126
throw e;
^
Error code 1 for command: /home/USERNAME/IONIC_Workspace/local-business/platforms/android/gradlew with args: cdvBuildDebug,-b,/home/USERNAME/IONIC_Workspace/local-business/platforms/android/build.gradle,-Dorg.gradle.daemon=true
ERROR building one of the platforms: Error: /home/USERNAME/IONIC_Workspace/local-business/platforms/android/cordova/build: Command failed with exit code 8
You may not have the required environment or OS to build this project
Error: /home/USERNAME/IONIC_Workspace/local-business/platforms/android/cordova/build: Command failed with exit code 8
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:139:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Process.ChildProcess._handle.onexit (child_process.js:810:5)
I haven't used the file 03_Руководство_по_эксплуатации.rst in my project and don't know what to do with it.
Can someone give hints how to solve my problem.
The :processDebugResources task tries to copy the 03_Руководство_по_эксплуатации.rst to the resource folders in your platform projects.
There might be different reasons why cordova does want to copy this file:
it is needed by an libary
it is configured in your config.xml
permissions error
some caching problem
You cold try:
delete your platforms folder, this will cause ionic build android to regenerate the hole folder (ist like deleting the cache)
check if the file exists and create an empty dummyfile
check if the file is mentioned in your config.xml and remove that line
reinstall all dependencies
uninstall all unnecessary plugins
remove all platforms and add them agian