The steps are: Install Java (OpenJDK), install SDK, download Targets, check PATHS, create an app, compile with $ ant, create an Android Virtual Device (AVD), start the AVD, compile the app in the AVD with $ adb install
Important Note: I have not managed to make the PATHs absolute so in some cases I have to run the applications from the directory where they are with the prefix ./
I start:
I install OpenJDK following ‘https://help.ubuntu.com/community/Java’
I install Android SDK following ‘http://developer.android.com/sdk/installing/index.htm’
I go to the directory where I installed Android and look for the /tools subdirectory and run:
$ ./android
android prof
A GUI opens, I download the Android 4.1 Target
Create a new project from the command line: ‘http://developer.android.com/tools/projects/projects-cmdline.htm’
Example of a line to create an app:
$ ./android create project –target 1 –path ./myFirstAndroid –activity myFirtsAndroidActivity –package com.example.myandroid
I notice that I have to configure an Android Virtual Device AVD, I read the explanation of how to use it from the command line: ‘http://developer.android.com/tools/devices/managing-avds-cmdline.html’
I create an AVD by doing from the /tools directory:
$ ./android create avd -n my_android1.5 -t 1
I start the emulator with:
$ ./emulator @my_android1.5
I'm going to make the first app, following this tutorial ‘http://developer.android.com/training/basics/firstapp/index.html’
and there you can see my application saying Hello World. :D
Some problems I encountered:
it tells me that I don’t have Targets, I find this answer: ‘http://stackoverflow.com/questions/1671462/android-can-not-find-a-target’
when trying to compile with adb it tells me that it can’t find the program and I have to add it to the PATH (route) of my operating system… as
I understand it I have to tell my operating system that when adb is written in a terminal it should look for the application that resides in /platform-tools. I found this
help:'http://www.codecoffee.com/tipsforlinux/articles/11.html' and this other one explains how to enable a PATH with the export command:
'http://www.cyberciti.biz/faq/unix-linux-adding-path/' $export PATH=$PATH:~/code/android-sdk-linux/platform-tools $export PATH=$PATH:~/code/android-s dk-linux/ $export PATH=$PATH:~/code/android-sdk-linux/tools I got this error because I did not have the AVD * daemon not running. starting it now on port 5037 * * daemon started successfully *not found - waiting for device - I look for how the Android Emulator works at:
'http://developer.android.com/tools/help/emulator.html'
Las etapas son: Instalar Java (OpenJDK), instalar SDK, descargar Targets, verificar los PATHS, crear una aplicación, compilar con $ ant, crear un Android Virtual Device (AVD), arrancar el AVD, compilar la app en el AVD con $ adb install
Nota Importante: no he logrado hacer los PATH absolutos entonces en algunos casos me toca ejecutar las aplicaciones desde el directorio donde se encuentran con el prefijo ./
Empiezo:
Instalo OpenJDK siguiendo ‘https://help.ubuntu.com/community/Java’
Instalo Android SDK siguiendo ‘http://developer.android.com/sdk/installing/index.htm’
Voy al directorio donde instale Android y busco el subdirectorio /tools y ejecuto:
$ ./android
android prof
Me abre una GUI, descargo el Target Android 4.1
Crear un nuevo proyecto desde lìnea de comando: ‘http://developer.android.com/tools/projects/projects-cmdline.htm’
ejemplo de linea para crear una app:
$ ./android create project –target 1 –path ./myFirstAndroid –activity myFirtsAndroidActivity –package com.example.myandroid
noto que hay que configurar un Android Virtual Device AVD, leo la explicación de cómo usarlo desde linea de comando:‘http://developer.android.com/tools/devices/managing-avds-cmdline.html’
creo un AVD haciendo desde el directorio /tools:
$ ./android create avd -n my_android1.5 -t 1
inicio el emulador con:
$ ./emulator @my_android1.5
Voy a hace la primera app, siguiendo este tutorial ‘http://developer.android.com/training/basics/firstapp/index.html’
y ahi se ve mi aplicación diciendo Hello World. :D
Algunos problemas que se me presentaron:
me dice que no tengo Targets, encuentro esta respuesta:‘http://stackoverflow.com/questions/1671462/android-can-not-find-a-target’
al intentar compilar con adb me dice que no encuentra el programa y debo agregarlo a los PATH (ruta) de mi sistema operativo .. según entiendo debo decirle a mi sistema operativo que cuando en alguna terminal se escriba adb el vaya a buscar la aplicación que reside en /plataform-tools.
Encuentro esta ayuda:‘http://www.codecoffee.com/tipsforlinux/articles/11.html’
y esta otra explica como habilitar un PATH con el comando export:‘http://www.cyberciti.biz/faq/unix-linux-adding-path/’
$export PATH=$PATH:~/code/android-sdk-linux/platform-tools
$export PATH=$PATH:~/code/android-sdk-linux/
$export PATH=$PATH:~/code/android-sdk-linux/tools
Me salio este error por no tener el AVD
- daemon not running. starting it now on port 5037 *
- daemon started successfully *not found
- waiting for device -
busco como funciona el Android Emulator en :‘http://developer.android.com/tools/help/emulator.html’
- Sources/Fuentes:
Blogs, Sitios Web y Redes Sociales / Blogs, Webs & Social Networks | Plataformas de Contenidos/ Contents Platforms |
---|---|
Mi Blog / My Blog | Los Apuntes de Tux |
Mi Blog / My Blog | El Mundo de Ubuntu |
Mi Blog / My Blog | Nel Regno di Linux |
Mi Blog / My Blog | Linuxlandit & The Conqueror Worm |
Mi Blog / My Blog | Pianeta Ubuntu |
Mi Blog / My Blog | Re Ubuntu |
Mi Blog / My Blog | Nel Regno di Ubuntu |
Red Social Twitter / Twitter Social Network | @hugorep |
Blurt Official | Blurt.one | BeBlurt | Blurt Buzz |
---|---|---|---|
Telegram and Whatsapp
Thank you for supporting my content @blurtconnect-ng
Upvoted. Thank You for sending some of your rewards to @null. Get more BLURT:
@ mariuszkarowski/how-to-get-automatic-upvote-from-my-accounts
@ blurtbooster/blurt-booster-introduction-rules-and-guidelines-1699999662965
@ nalexadre/blurt-nexus-creating-an-affiliate-account-1700008765859
@ kryptodenno - win BLURT POWER delegation
Note: This bot will not vote on AI-generated content
Thanks!