|
|
install the Java Development Kit (JDK)
# On Redhat or Fedora run the following
yum install java-1.7.0-openjdk
yum install java-1.7.0-openjdk-devel
install the android sdk:
http://developer.android.com/sdk/index.htmladjust your path environment variable
# echo 'export PATH=$PATH:/home/fox/android/tools:/home/fox/android/platform-tools' >> ~/.bashrc
echo 'export PATH=$PATH:/path/to/android/tools' >> ~/.bashrc
optionally install eclipse
create an ADV (android virtual device) emulator
Tip: Add the platform-tools/ as well as the tools/ directory to your PATH environment variable.
reference: http://developer.android.com/guide/developing/projects/projects-cmdline.html
The following cli command will create an android project skeleton named HelloWorld in your home directory.
android create project \
--package com.example.helloworld \
--activity HelloWorld \
--target 3 \
--path ~/HelloWorld
The "build target" for your application.
This corresponds to an Android platform library (including any add-ons, such as Google APIs) that you would like to build your project against.
To see a list of available targets and their corresponding IDs, execute: android list targets.
The name for your project.
This is optional. If provided, this name will be used for your .apk filename when you build your application.
The location of your project directory.
If the directory does not exist, it will be created for you.
The name for your default Activity class.
This class file will be created for you inside <path_to_your_project>/src/<your_package_namespace_path>/ .
This will also be used for your .apk filename unless you provide a name.
the package namespace for your project
This will follow the Java programming language standards.
modify your source code...
Reference: http://developer.android.com/guide/developing/building/building-cmdline.html
The Ant script compiles and builds your project into a .apk file which may be installed on an emulator or device.
Ant provides the following two build modes:
Regardless of the build mode chosen the application must be signed before it can be installed on an emulator or device.
In development (debug mode) the SDK will automatically sign your project with a development key. An application signed with a development key cannot be distributed.
In production (release mode) the SDK will not sign the .apk file, you will need to do this manually using the Keytool and Jarsigner.
Navigate to root of the project
Compile the project using Ant.
ant debug
adb install ~/HelloWorld/bin/HelloWorld-debug.apkYou might need to specify the device serial which is found on the top of the virtual device titlebar.
adb -s emulator-5554 install ~/HelloWorld/bin/HelloWorld-debug.apkA top secret command for both building in debug mode and deploying to a running emulator use the following command:
ant install
Periodically you may want to update your development environment, here's how:
Not directly related to Android development, but I plan to learn Scala (expand my use of functional langs) while building android apps. Replace version with latest in the subsequent code block.
# download & unzip
wget hhttp://www.scala-lang.org/files/archive/scala-2.11.0.tgz
tar -xzvf scala-2.11.0.tgz
# install
sudo mv scala-2.11.0 /usr/share/scala
sudo ln -s /usr/share/scala/bin/scala /usr/bin/scala
sudo ln -s /usr/share/scala/bin/scalac /usr/bin/scalac
sudo ln -s /usr/share/scala/bin/fsc /usr/bin/fsc
sudo ln -s /usr/share/scala/bin/scaladoc /usr/bin/scaladoc
sudo ln -s /usr/share/scala/bin/scalap /usr/bin/scalap
might need sbt (scala build tools)
game engine
game making blog scala android scawars devs used: maven progaurd scala
android app development with scala
andoir app development with scala
compiles only the parts of scala lib that your application needs.
tetris in scala step by step howto really in depth !
port a scala tetris game to android using 'android', sbt, pfn/android-plugin,
libGDX is a cross-platform Java game development framework based on OpenGL (ES) that works on Windows, Linux, Mac OS X, Android, your WebGL enabled browser and iOS.
https://github.com/libgdx/libgdx
https://github.com/libgdx/libgdx/wiki/
describes how to use sbt (scala build tool and g8 to build android apps)
Mario's game dev blog which is very active, he authored libGDX and builds lots of android games.
unofficial libGDX references
develop games in scala with libgdx getting-started
libGDX games on android youtube video
Source: https://foxhop.net/f3a3100e-2f95-11f1-a963-e86a64d24d78/android-programming-on-linux
Snapshot: 2026-05-25T01:34:36Z
Generator: Remarkbox 1527ef7