Android development environment on the command line.

in android •  3 months ago 

510.-Android-entorno-comando.png

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'

image.png

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’

image.png

  • Sources/Fuentes:

Android Developers..

banner-traductor-globe-g308afd03f_1280.jpg

banners-proprieta-immagini-english-7-605x105.png

banner-propiedad-imagenes.png

Blogs, Sitios Web y Redes Sociales / Blogs, Webs & Social NetworksPlataformas de Contenidos/ Contents Platforms
Mi Blog / My BlogLos Apuntes de Tux
Mi Blog / My BlogEl Mundo de Ubuntu
Mi Blog / My BlogNel Regno di Linux
Mi Blog / My BlogLinuxlandit & The Conqueror Worm
Mi Blog / My BlogPianeta Ubuntu
Mi Blog / My BlogRe Ubuntu
Mi Blog / My BlogNel Regno di Ubuntu
Red Social Twitter / Twitter Social Network@hugorep

banner-Universo-Blurt-con-dapps-1-wallpapers-1200x146-con-logo-blurt.png

Blurt OfficialBlurt.oneBeBlurtBlurt Buzz
blurt-blog.pngblurt-one.pngBeBlurt.pngblurt-buzz.png

separador-firma-rounded-in-photoretrica.png

EMdeU-422x422-original-redonda.pngLAdeT-homepage-original-redonda-446x446.pngLinuxlandit-homepage-original-redonda-446x446.pngNel-Regno-di-Linux-homepage-original-redonda-446x446.png

separador-firma-rounded-in-photoretrica.png


Posted from https://blurtlatam.intinte.org

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE BLURT!
Sort Order:  
Thank you for sharing such great content!
Congratulations on your post in #blurt-131902 or #blurtconnect
Blurt to the Moon
Most welcome Votes for our community Witness Here
Your publication has been manually upvoted by @oadissinOfficial Blurtconnect-ng Page
Please delegate Blurt power to @blurtconnect-ng and help support this curation account
Also, keep in touch with Blurtconnect-ng family on 

Telegram and Whatsapp

  ·  3 months ago  ·  

Thank you for supporting my content @blurtconnect-ng


Posted from https://blurtlatam.intinte.org

  ·  3 months ago  ·  

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

  ·  3 months ago  ·  

Thanks!


Posted from https://blurtlatam.intinte.org