Titanium Build Error Invalid Device - android

I've recently updated my Android SDK to the latest available and I'm getting the following error when I try to build from the command line and deploy to my Samsung Galaxy S3:
$ titanium build -p android -T device -C --device-id 6f01b9ae
Titanium Command-Line Interface, CLI version 3.4.0, Titanium SDK version 3.4.0.GA
Copyright (c) 2012-2014, Appcelerator, Inc. All Rights Reserved.
Please report bugs to http://jira.appcelerator.org/
[ERROR] : Invalid "--device-id" value "6f01b9ae"
For help, run: titanium help build
Does anybody have anything I can try to get past this? I'm pretty stuck and would really appreciate some help.
Thanks!

Because the Titanium tooling uses android's adb to push to your device, first run
adb devices
Verify that the device is seen by adb and that the id you are using matches.
Second, -C and --device-id are the same flags and do not need to be repeated. These are the same:
$ titanium build -p android -T device -C 6f01b9ae
$ titanium build -p android -T device --device-id 6f01b9ae

Related

adb.exe is too old; please install version 1.0.39 or later......how to update adb version

I will try to run my first flutter App in my samsung phone it give the following error (i will also try another phone it also same)
Launching lib\main.dart on SM A105F in debug mode...
The ADB at "C:\Users\yyy\AppData\Local\Android\sdk\platform-tools\adb.exe" is too old; please install version 1.0.39 or later.
Error launching application on SM A105F.
I am using android studio in the windows environment
how to update adb version plz help
I have faced same issue and I have solved this issue using the below steps. would you please refer below steps it will help you to solve the above issue
Open Android studio then click on SDK manager it showing in right side icon then select Update and click on check now button for platform-tools
( Android studio -> SDK manager ->Updates ->check now )
Let me know your thought for the same
Thank you
Using Command Line for update android sdk and platform ,adb..etc(credits #nsg)
android list sdk --all
And then to get one of the packages in that list from the command line, use:
android update sdk -u -a -t
Where -u stands for --no-ui, -a stands for --all and -t stands for --filter.
If you need to install multiple packages do:
android update sdk -u -a -t 1,2,3,4,..,n

Android Emulator not running for Cordova App - adb -s emulator-5584 shell cat /proc/cpuinfo

I'm trying to make my environment work with Cordova and Android emulator with no success. I have installed the Android Studio and I can successfully start the Android Emulator.
I have created a cordova application with the command below:
cordova create myApp
I added support for the Android platform:
cordova plataform add android
I had the following output:
Using cordova-fetch for cordova-android#~6.2.2
Adding android project...
Creating Cordova project for the Android platform:
Path: platforms\android
Package: io.cordova.hellocordova
Name: HelloCordova
Activity: MainActivity
Android target: android-25
Subproject Path: CordovaLib
Android project created with cordova-android#6.2.3
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.
--save flag or autosave detected
Saving android#~6.2.3 into config.xml file ...
Then I try to run the application:
cordova run android
The emulator starts, after a while, that I have the error below in the command prompt:
No target specified and no devices found, deploying to emulator
No emulator specified, defaulting to Nexus_5X_API_24
Waiting for emulator to start...
Error: Failed to execute shell command "getprop,dev.bootcomplete"" on device:
Error: C:\Users\username\AppData\Local\Android\sdk\platform-tools\adb.exe: Command failed with exit code 3221226356
Does anyone knows how to fix this error?
Some others environment info:
C:\>node -v
v7.4.0
C:\>cordova -v
7.0.1
C:\>java -version
java version "1.8.0_131"
Java(TM) SE Runtime Environment (build 1.8.0_131-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.131-b11, mixed mode)
Edit 1
I have done those steps:
Uninstalled "Android SDK Tools"
Uninstalled "Android Studio"
Deleted files from "C:\Users\USER\AppData\Local\Android\sdk" and "C:\Program Files\Android\Android Studio" files (Because some maybe in use during the uninstallation)
Installed Android Studio
Updated Android Studio
When I execute the command below, I have more information about the error:
cordova run android --verbose
With this output:
Command finished with error code 3221226356:
C:\Users\USER\AppData\Local\Android\sdk\platform-tools\adb.exe
-s,emulator-5584,shell,cat,/proc/cpuinfo Error: Failed to execute shell command "cat,/proc/cpuinfo"" on device: Error:
C:\Users\USER\AppData\Local\Android\sdk\platform-tools\adb.exe:Command
failed with exit code 3221226356
When I execute the command below, the adb shows the emulator cpu info, after that, the process stops and the windows ask to break or debug
adb -s emulator-5584 shell cat /proc/cpuinfo
Downgrade your SDK platform-tools to rev25.0.1.
If you dev in windows, you can download it in https://dl-ssl.google.com/android/repository/platform-tools_r25.0.1-windows.zip
delete or rename your old platform-tools folder, and extract the downloaded file to it.
Works for me!
I encountered the same issue with an emulator of Nexus5 & Oreo/Nougat.
I changed my emulator to Galaxy Nexus & Lollipop and it worked fine without any modification in the Cordova directories.
It does not seem to be the right solution, but some lower combinations might be available for avoiding this issue.
The command line is:
$ cordova emulate android
The following is the success log:
No emulator specified, defaulting to Galaxy_Nexus_API_22
Waiting for emulator to start...
emulator: Requested console port 5584: Inferring adb port 5585.
emulator: WARNING: encryption is off
path /home/ximia/.android/avd/Galaxy_Nexus_API_22.avd/system.img.qcow2
Waiting for emulator to boot (this may take a while)...BOOT COMPLETE
Edit your virtual device (ADV) and go into advanced settings and uncheck Multi-Core CPU.
Work fine to me.

Jenkins: could not create Android emulator failed to parse AVD config file

I have a Jeknins installation on my local PC. I'm successfully able to integrate Android application code with github and generate .apk file as an artifact.
The problem is in the test case execution. I cannot get the Android emulator to start.
It says:
\sdk/tools/android.bat" create avd -f -a -c 500M -s 480x640 -n hudson_en-US_480_480x640_android-21_armeabi-v7a -t android-21 --abi armeabi-v7a
[android] Could not create Android emulator: Failed to parse AVD config file
Recording test result.
I have already tried this:
Could not create Android emulator: Failed to parse AVD config file
Also, I ran the same create command from command line and it successfully craeted the AVD.
Not a complete answer, but it seems that the andoid Sdk update that came out recently - SDK Tools, Revision 25.3.0 (March 2017) - has made some significant changes.
The Android emulator jenkins plugin uses the android command (/home/jenkins/Android/Sdk/tools/android), but if I copy the commands from the console output and try and run that from the command line on the Jenkins machine I get:
[android] /home/jenkins/Android/Sdk/tools/android create avd -f -a -s HVGA -n hudson_en-US_120_HVGA_7.02 -t 7.02
[android] Could not create Android emulator: Failed to parse AVD config file
and try and run that from the command line on the Jenkins machine I get:
The android command is no longer available.
For manual SDK and AVD management, please use Android Studio.
For command-line tools, use tools/bin/sdkmanager and tools/bin/avdmanager
So it seems that from 25.3.0 onwards, the 'android' command is deprecated and has been removed, but the emulator plugin hasn't been updated to reflect this.
As a solution, the best bet seems to be to install an earlier version of the android Sdk that still supports the 'android' command, at least until the plugin is updated.
Try leaving the sdcard field empty.
I ran the command that the android plugin printed out via a shell script and added -v (for verbose) after android.
I then saw that the problem was that it could not create an sdcard.
When not filling in an sdcard size, it worked.

Can't get QtCreator to deploy to android emulator

I'm running following setup:
Ubuntu 13.10 64bit
Qt creator 3.0.1
Qt 5.2.1
NDK r9d 64bit
adt-bundle-linux-x86_64-20140321.zip
I managed get it compile. I started emulator before deploying the app. but instead of sending the apk to running emulator it started a new one... Qt Create went not responding for a while...new emulator got booted up and after a while Qt createor started to respond again and returned following compile output.
Also I tried to get it working on Windows 7 64bit before Ubuntu but the result was very same. Also I believe the software versions were mostly same.
17:11:12: Removing directory /home/rikko/android/projects/build-omgFrickingGosh-Android_for_armeabi_v7a_GCC_4_8_Qt_5_2_1-Debug/android-build
17:11:12: Starting: "/usr/bin/make" INSTALL_ROOT=/home/rikko/android/projects/build-omgFrickingGosh-Android_for_armeabi_v7a_GCC_4_8_Qt_5_2_1-Debug/android-build install
cp -f -R /home/rikko/android/projects/omgFrickingGosh/qml/omgFrickingGosh /home/rikko/android/projects/build-omgFrickingGosh-Android_for_armeabi_v7a_GCC_4_8_Qt_5_2_1-Debug/android-build/assets/qml/
install -m 755 -p "libomgFrickingGosh.so" "/home/rikko/android/projects/build-omgFrickingGosh-Android_for_armeabi_v7a_GCC_4_8_Qt_5_2_1-Debug/android-build/libs/armeabi-v7a/libomgFrickingGosh.so"
17:11:13: The process "/usr/bin/make" exited normally.
Error while building/deploying project omgFrickingGosh (kit: Android for armeabi-v7a (GCC 4.8, Qt 5.2.1))
When executing step 'Deploy to Android device'
17:13:26: Elapsed time: 02:14.</code>
I actually maanged to get it runningun Windows.
Seems that most probablt the suspects are new SDK or NDK.
So the configuration that is currently working on 64bit Win 7 is followng:
JDK: jdk-7u51-windows-x64.exe
Ant: apache-ant-1.9.2-bin.zip
NDK: android-ndk-r9-windows-x86_64.zip
SDK: adt-bundle-windows-x86-20131030.zip (contains SDK manager 22.3)
Qt 5.2.1 and QtCreator 3.0.1 both from qt-opensource-windows-x86-1.5.0-2-online.exe
Contact me if you have similar problem and can't get your hands on these package versions yourself.

Android Emulator is running but not loading my app in Titanium

I can run the app in the "mobile app preview in browser", and I can boot up the Android Emulator successfully. But the emulator just showed me the home screen all the time without loading my app. I've looked through all the similar questions online but couldn't find a solution.
Here is the console...hope someone can help me out. Thanks!
*Titanium Command-Line Interface, CLI version 3.1.0, Titanium SDK version 3.1.0.GA
Copyright (c) 2012-2013, Appcelerator, Inc. All Rights Reserved.
[INFO] : Running emulator process: python "C:\Users\Ni\AppData\Roaming\Titanium\mobilesdk\win32\3.1.0.GA\android\builder.py" "emulator" "myFirstApp" "C:\Users\Ni\Android-sdk\adt-bundle-windows-x86\sdk" "C:\Users\Ni\Documents\Titanium_Studio_Workspace\myFirstApp" "com.yn.myFirstApp" "4" "HVGA" "armeabi"
[INFO] : Running build process: python "C:\Users\Ni\AppData\Roaming\Titanium\mobilesdk\win32\3.1.0.GA\android\builder.py" "simulator" "myFirstApp" "C:\Users\Ni\Android-sdk\adt-bundle-windows-x86\sdk" "C:\Users\Ni\Documents\Titanium_Studio_Workspace\myFirstApp" "com.yn.myFirstApp" "4" "HVGA"
[INFO] logfile = C:\Users\Ni\Documents\Titanium_Studio_Workspace\myFirstApp\build.log
[INFO] Building myFirstApp for Android ... one moment
[INFO] Titanium SDK version: 3.1.0 (04/15/13 18:45 57634ef)
[INFO] : Emulator process exited successfully
[INFO] : Project built successfully in 3s 24ms
[INFO] : Emulator not running, exiting...*
Don't know if you have solved this, but for the reference of others, you shouldn't run the emulator yourself, allow Titanium Studio to launch the emulator by simply running your application with the emulator option (like Martin says)
In my own experience, i'm able to run my app in the emulator, but for all subsequent runs, i need to close the emulator and run the app again since Studio fails to detect the emulator and gives me an error similar to yours.
I forgot to add an answer for this question...
I could successfully run the Titanium only when I choose "run as administrator".
When this happens, you can install the app manually.
You will find your app's executable in the following directory under your app directory: build/android/bin/YOURAPPNAME.apk. On the Mac, you need to open a terminal window, cd to that directory, and type "chmod 777 YOURAPPNAME.apk". Then cd to the platform-tools directory under your android sdk installation directory, and run the following commands:
./adb kill-server
./adb start-server
./adb install <full path name to YOURAPPNAME.apk>
You will see your app appear on the home screen of the emulator.
I made a shell script to do this.

Categories

Resources