A blog for technology, SEO tips, website development and open source programming.

Get Your Development Environment Ready for Android L

1 620

Android L Developer Preview is an early release of the upcoming Android platform. This post shows how to get your development environment ready, how to create a simple app & how to use Material Design theme.

(1) Run Android SDK Manger Update

  1. Run Android SDK Manager.
  2. Under Tools section, select the latest Android SDK ToolsPlatform-tools, and Build-tools.
  3. Select everything under the Android L Developer Preview section
  4. Click Install packages…
  5. Accept the Licensing Agreement for all of the packages and click Install

 

(2) Configuring AVD or Emulator

  1. Star Android Virtual Device manger (AVD)
  2. Click Create…
  3. Use the following settings:
    • AVD Namepick a name e.g. L-Preview
    • Device: Either Nexus 5 or Nexus 7
    • Target: Android L (Preview) – API Level L
    • CPU: Intel Atom (x86)
  4. Run the Emulator (it may take long time the first time you run it)

avdL

( 3 ) Create Your First Android L Project

  • Create a new Project use the following settings:
    • Application Name: Android L
    • Project Name: android-L-preview
    • Package Name: com.panayiotisgeorgiou.android.L
    • Minimum SDK: L Preview
    • Target SDK: L Preview
  • Click Next
  • When you reach Activity window Select Empty Activity
  • Click Finish
  • If the MainActivity is not created under src folder, right click on the project and select New >> Other >> under Android select Android Activity >> Empty Activity

(4) Use The new Material Theme

  • res/values/styles.xml
<resources>
   <style name="AppTheme" parent="android:Theme.Material.Light">
  </style>
</resources>
  • AndroidManifest.xml

Notice: minSdkVersion=”L”


<?xmlversion="1.0"encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.panayiotisgeorgiou.android.L"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="L"
        android:targetSdkVersion="21" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainActivity"
            android:label="@string/title_activity_main" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>

( 5 ) Deploy & Run

android-L-app-run

1 Comment
  1. Ainslie says

    This article used to create a simple app and how to use Material Design theme & how to get your development environment ready.

Leave a Reply

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More