install android studio [ubuntu]

based on:

open terminal ctrl alt t:

dependencies for linux 64bit:
based on:

sudo dpkg --add-architecture i386
sudo apt update

sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1

install it:
sudo apt install openjdk-8-jdk
cd ~/
unzip android-studio-ide-*.zip
rm ~/android-studio-*.zip
cd ~/android-studio/bin

standart > next > next > finish
configure > SDK manager > activate 2.3 (api 9) > apply > accept license > ok
configure > SDK manager > activate 4.1 > apply > accept license > ok

android studio:
configure > SDK manager > activate 4.1 > apply… > ok
start new android studio project > next > next > navigation drawer activity > next > finish
click run button > create new emulator > nexus 4 >kitkat

when you get the screen with “welcome to android studio”
configure > create desktop entry(for all users) > ok

when the program is loaded:
tools > create desktop entry > [x]create entry for all users > ok
tools > android > sdk manager activate 2.3.3 > apply > ok
new application > minimum sdk > 2.3.3

remove android-studio:
sudo apt-get remove openjdk-8-jdk -y
sudo rm -r ~/android-studio/
sudo rm -r ~/Android
sudo rm -r ~/AndroidStudioProjects
sudo rm -r ~/.android
sudo rm -r ~/.AndroidStudio*

remove i386 architecture:
based on:
sudo apt-get purge ".*:i386"
sudo dpkg --remove-architecture i386
sudo apt-get update

try python for android:

try libgdx (2D /3D game library for android apps):
mkdir -p /home/fredfire1/Tutorials/libgdx
java -jar gdx-setup.jar

Game class:libgdxTest
Android SDK:/home/fredfire1/Android/Sdk
Sub Projects:[x]Android
Extensions: [x]box2d

generate >YES
use more recent version of build tools > YES
more recent android api > YES

to import that project into Android-studio:
file > open > ~/Tutorials/libgdx/build.gradle

upgrade gradle..

edit file:
core > java > com.fredfire1.libgdx.test

package com.fredfire1.libgdx_test;

import com.badlogic.gdx.ApplicationListener;
import com.badlogic.gdx.Gdx;
import; //was 10 before
import com.badlogic.gdx.math.Vector3;

public class libgdxTest implements ApplicationListener {

	private PerspectiveCamera camera;
	private ModelBatch modelBatch;
	private Model box;
	private ModelInstance boxInstance;
	private Environment environment;

	public void create() {
		// Create camera sized to screens width/height with Field of View of 75 degrees
		camera = new PerspectiveCamera(
		// Move the camera 3 units back along the z-axis and look at the origin
		// Near and Far (plane) repesent the minimum and maximum ranges of the camera in, um, units
		camera.near = 0.1f;
		camera.far = 300.0f;
		// A ModelBatch is like a SpriteBatch, just for models.  Use it to batch up geometry for OpenGL
		modelBatch = new ModelBatch();
		// A ModelBuilder can be used to build meshes by hand
		ModelBuilder modelBuilder = new ModelBuilder();
		// It also has the handy ability to make certain premade shapes, like a Cube
		// We pass in a ColorAttribute, making our cubes diffuse ( aka, color ) red.
		// And let openGL know we are interested in the Position and Normal channels
		box = modelBuilder.createBox(2f, 2f, 2f,
				new Material(ColorAttribute.createDiffuse(Color.RED)),
				Usage.Position | Usage.Normal
		// A model holds all of the information about an, um, model, such as vertex data and texture info
		// However, you need an instance to actually render it.  The instance contains all the
		// positioning information ( and more ).  Remember Model==heavy ModelInstance==Light
		boxInstance = new ModelInstance(box,0,0,0);
		// Finally we want some light, or we wont see our color.  The environment gets passed in during
		// the rendering process.  Create one, then create an Ambient ( non-positioned, non-directional ) light.

		environment = new Environment();
		environment.set(new ColorAttribute(ColorAttribute.AmbientLight, 0.8f, 0.8f, 0.8f, 1.0f));
	public void dispose() {
	public void render() {
		// You've seen all this before, just be sure to clear the GL_DEPTH_BUFFER_BIT when working in 3D, 0,,;, 1, 1, 1); | GL20.GL_DEPTH_BUFFER_BIT);
		// was 10 before
		// For some flavor, lets spin our camera around the Y axis by 1 degree each time render is called
		camera.rotateAround(Vector3.Zero, new Vector3(0,1,0),1f);
		// When you change the camera details, you need to call update();
		// Also note, you need to call update() at least once.
		// Like spriteBatch, just with models!  pass in the box Instance and the environment
		modelBatch.render(boxInstance, environment);
	public void resize(int width, int height) {
	public void pause() {
	public void resume() {

Build > Generate Signed APK:

more links about libgdx:

opengl 2:


One thought on “install android studio [ubuntu]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s