Android trên Ubuntu

Install Android SDK On Ubuntu 14.04

Sửa lỗi:

ERROR: 32-bit Linux Android emulator binaries are DEPRECATED, to use them
you will have to do at least one of the following:
– Use the ‘-force-32bit’ option when invoking ’emulator’.
– Set ANDROID_EMULATOR_FORCE_32BIT to ‘true’ in your environment.
Either one will allow you to use the 32-bit binaries, but please be aware that these will disappear in a future Android SDK release.
Consider moving to a 64-bit Linux system before that happens.

Chèn biến môi trường để có thể gọi chương trình từ cửa sổ termina

export PATH=${PATH}:/home/nguyenducquang/android-sdk-linux/tools
export PATH=${PATH}:/home/nguyenducquang/android-sdk-linux/platform-tools

Chạy chương trình Android SDK manager  từ cửa sổ Terminal gõ lệnh

android

Chạy chương trình Android Virtual Device Manager

android avd

If your hardware doesn’t support 64bit or you can’t reinstall right now you can temporarily bypass the problem by passing -force-32bit when you start the emulator from the commandline or by setting ANDROID_EMULATOR_FORCE_32BIT to true in your environment (as the error says). You can do this by running:

gedit .profile  

From a terminal. Add the text:

export ANDROID_EMULATOR_FORCE_32BIT=true  

to the end of the file and save and close it. I can’t test it right now but you’ll either need to run source .profile from the terminal or restart for the changes to take effect.

Try launching the emulator.

Khi cài đặt được hoàn tất, mở Eclipse (Application -> Programming -> Eclipse)
Trên menubar, kích Help -> Install new software

android-sdk-eclipse1
Tại trường Work with, nhập vào https://dl-ssl.google.com/android/eclipse và nhấn nút Add.
Check vào các Developer Tools cho Android mà chờ cài đặt, sau khi cài đặt thành công sẽ auto restart exlipse của bạn.

Vào Windows -> Preferences. Bên phía trái, chọn entry Android.

Nhập đường dẫn file Android vào trường SDK location. Kích Apply và OK.

Công việc vậy là OK! Chúc các bạn thành công.

Nguồn tham khảo: http://onthefencedevelopment.com/?p=455

Android trên Ubuntu

Leave a comment