john pfeiffer
  • Home
  • Categories
  • Tags
  • Archives

command line compilation

Command line compilation of an android project

AndroidManifest.xml: An additional Android manifest file, describing the name, version, access rights, referenced library files for the application.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="net.kittyandbear.androidhi"
    android:versionCode="1"
    android:versionName="1.0" >
    <uses-sdk android:minSdkVersion="8" />
    <application
        android:label="@string/app_name" >
        <activity
            android:label="@string/app_name"
            android:name=".ClassNameHere" >
            <intent-filter >
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
</manifest>



res/layout/main.xml



PROJECTNAME/src/net/kittyandbear/PROJECTNAME/CLASSNAME.java

Given the manifest above we can use the am command from the adb shell:

am start -a android.intent.action.MAIN -n net.kittyandbear.androidhi/.ClassNameHere

Alternatively with the full package in the path:

am start -a android.intent.action.MAIN -n net.kittyandbear.androidhi/net.kittyandbear.androidhi.ClassNameHere

  • « android write file to sd
  • Xen virtualization ubuntu INCOMPLETE »

Published

Apr 22, 2012

Category

android

~92 words

Tags

  • android 9
  • cli 6
  • command 29
  • compilation 2
  • java 252