Posts Tagged ‘Android SDK’

Tips for Android developer: An SDK Target must be specified

I have met a strange problem when I used Eclipse to create a new Android project today, it remained me “An SDK Target must be specified” and Android SDK targets selection list in “Build Target” window “disappeared”.

Searched by Google, most of answers for this “An SDK Target must be specified” problem showed that I should go to “Windows->Android SDK and AVD Manager” in Eclipse and click on “Installed Packages” and then “Update All”. But that’s not my problem, I have used the Eclipse to program with Android long ago and every thing is OK till today. So I continued to search and finally on the Rowan Crane’s Blog I found the resolved method, it is just to change the font size in Eclipse:

Window / Preferences / General / Appearance / Basic / Colours and Fonts

Change “Text Font” and “Dialog Font” to a smaller value, dropping from 10 to 8 or smaller number maybe helped.

The “An SDK Target must be specified” problem likes a joke Eclipse played with me.

2 comments - What do you think?  Posted by CuteAndroid - April 20, 2010 at 4:31 pm

Categories: Android, Android developer   Tags: , , , , ,

Android Technical Articles Overview

As Android developer, Android Developer’s Guide is the most worth reading “Android book“. If you read it carefully,you will find a lot of useful information. Such as the Android Technical Articles, below is the overview of them.

Avoiding Memory Leaks
Mobile devices often have limited memory, and memory leaks can cause your application to waste this valuable resource without your knowledge. This article provides tips to help you avoid common causes of memory leaks on the Android platform.

Backward Compatibility
The Android platform strives to ensure backwards compatibility. However, sometimes you want to use new features which aren’t supported on older platforms. This article discusses strategies for selectively using these features based on availability, allowing you to keep your applications portable across a wide range of devices.

Can I Use this Intent?
Android offers a very powerful and yet easy-to-use message type called an intent. You can use intents to turn applications into high-level libraries and make code modular and reusable. While it is nice to be able to make use of a loosely coupled API, there is no guarantee that the intent you send will be received by another application. This article describes a technique you can use to find out whether the system contains any application capable of responding to the intent you want to use.

Creating an Input Method
Input Method Editors (IMEs) provide the mechanism for entering text into text fields and other Views. Android devices come bundled with at least one IME, but users can install additional IMEs. This article covers the basics of developing an IME for the Android platform.

Drawable Mutations
Drawables are pluggable drawing containers that allow applications to display graphics. This article explains some common pitfalls when trying to modify the properties of multiple Drawables.

Faster Screen Orientation Change
When an Android device changes its orientation, the default behavior is to automatically restart the current activity with a new configuration. However, this can become a bottleneck in applications that access a large amount of external data. This article discusses how to gracefully handle this situation without resorting to manually processing configuration changes.

Future-Proofing Your Apps
A collection of common sense advice to help you ensure that your applications don’t break when new versions of the Android platform are released.

Gestures
Touch screens allow users to perform gestures, such as tapping, dragging, flinging, or sliding, to perform various actions. The gestures API enables your application to recognize even complicated gestures with ease. This article explains how to integrate this API into an application.

Introducing GLSurfaceView
This article provides an overview of GLSurfaceView, a class that makes it easy to implement 2D or 3D OpenGL rendering inside of an Android application.

Layout Tricks: Creating Reusable UI Components
Learn how to combine multiple standard UI widgets into a single high-level component, which can be reused throughout your application.

Layout Tricks: Creating Efficient Layouts
Learn how to optimize application layouts as this article walks you through converting a LinearLayout into a RelativeLayout, and analyzes the resulting implications on performance.

Layout Tricks: Using ViewStubs
Learn about using ViewStubs inside an application’s layout in order to inflate rarely used UI elements, without the performance implications which would otherwise be caused by using the tag.

Layout Tricks: Merging Layouts
Learn how to use the tag in your XML layouts in order to avoid unnecessary levels of hierarchy within an application’s view tree.

ListView Backgrounds: An Optimization
ListViews are very popular widgets within the Android framework. This article describes some of the optimizations used by the ListView widget, and how to avoid some common issues that this causes when trying to use a custom background.

Live Folders
Live Folders allow users to display any source of data on their home screen without launching an application. This article discusses how to export an application’s data in a format suitable for display inside of a live folder.

Onscreen Input Methods
The Input Method Framework (IMF) allows users to take advantage of on-screen input methods, such as software keyboards. This article provides an overview of Input Method Editors (IMEs) and how applications interact with them.

Painless Threading
This article discusses the threading model used by Android applications and how applications can ensure best UI performance by spawning worker threads to handle long-running operations, rather than handling them in the main thread. The article also explains the API that your application can use to interact with Android UI toolkit components running on the main thread and spawn managed worker threads.

Quick Search Box
Quick Search Box (QSB) is a powerful, system-wide search framework. QSB makes it possible for users to quickly and easily find what they’re looking for, both on their devices and on the web. This article discusses how to work with the QSB framework to add new search results for an installed application.

Touch Mode
This article explains the touch mode, one of the most important principles of Android’s UI toolkit. Whenever a user interacts with a device’s touch screen, the system enters touch mode. While simple in concept, there are important implications touch mode that are often overlooked.

Tracking Memory Allocations
This article discusses how to use the Allocation Tracker tool to observe memory allocations and avoid performance problems that would otherwise be caused by ignoring the effect of Dalvik’s garbage collector.

UI Framework Changes in Android 1.5
Explore the UI changes that were introduced in Android 1.5, compared with the UI provided in Android 1.0 and 1.1.

UI Framework Changes in Android 1.6
Explore the UI changes that were introduced in Android 1.6, compared with the UI provided in Android 1.5. In particular, this article discusses changes to RelativeLayouts and click listeners.

Updating the UI from a Timer
Learn about how to use Handlers as a more efficient replacement for java.util.Timer on the Android platform.

Using Text-to-Speech
The text-to-speech API lets your application “speak” to users, in any of several languages. This article provides an overview of the TTS API and how you use to add speech capabilities to your application.

Using WebViews
WebViews allow an application to dynamically display HTML and execute JavaScript, without relinquishing control to a separate browser application. This article introduces the WebView classes and provides a sample application that demonstrates its use.

WikiNotes: Linkify your Text!
This article introduces WikiNotes for Android, part of the Apps for Android project. It covers the use of Linkify to turn ordinary text views into richer, link-oriented content that causes Android intents to fire when a link is selected.

WikiNotes: Routing Intents
This article illustrates how an application, in this case the WikiNotes sample app, can use intents to route various types of linked text to the application that handles that type of data. For example, an app can use intents to route a linked telephone number to a dialer app and a web URL to a browser.

Window Backgrounds & UI Speed
Some Android applications need to squeeze every bit of performance out of the UI toolkit and there are many ways to do so. In this article, you will discover how to speed up the drawing and the perceived startup time of your activities. Both of these techniques rely on a single feature, the window’s background drawable.

Zipalign: an Easy Optimization
The Android SDK includes a tool called zipalign that optimizes the way an application is packaged. Running zipalign against your application enables Android to interact with it more efficiently at run time and thus has the potential to make it and the overall system run faster. This article provides a high-level overview of the zipalign tool and its use.

You can find the details of the Android Technical Articles in the Android Official website:Technical Articles

1 comment - What do you think?  Posted by CuteAndroid - April 14, 2010 at 4:20 pm

Categories: Android, Android developer   Tags: , , , , ,

Android SDK Tools Overview

As Android developer, Android Developer’s Guide is the most worth reading “Android book“. If you read it carefully,you will find a lot of useful information. Such the Android SDK Tools, below is the overview of them.

The Android SDK includes a variety of custom tools that help you develop mobile applications on the Android platform. The most important of these are the Android Emulator and the Android Development Tools plugin for Eclipse, but the SDK also includes a variety of other tools for debugging, packaging, and installing your applications on the emulator.

Android Development Tools Plugin (for the Eclipse IDE)
The ADT plugin adds powerful extensions to the Eclipse integrated environment, making creating and debugging your Android applications easier and faster. If you use Eclipse, the ADT plugin gives you an incredible boost in developing Android applications.

Android Emulator
A QEMU-based device-emulation tool that you can use to design, debug, and test your applications in an actual Android run-time environment.

Android Virtual Devices (AVDs)
Virtual device configurations that you create, to model device characteristics in the Android Emulator. In each configuration, you can specify the Android platform to run, the hardware options, and the emulator skin to use. Each AVD functions as an independent device with it’s own storage for user data, SD card, and so on.

Hierarchy Viewer
The Hierarchy Viewer tool allows you to debug and optimize your user interface. It provides a visual representation of your layout’s hierarchy of Views and a magnified inspector of the current display with a pixel grid, so you can get your layout just right.

layoutopt
This tool lets you quickly analyze your application’s layouts for efficiency.

Draw 9-patch
The Draw 9-patch tool allows you to easily create a NinePatch graphic using a WYSIWYG editor. It also previews stretched versions of the image, and highlights the area in which content is allowed.

Dalvik Debug Monitor Service (ddms)

Integrated with Dalvik, the Android platform’s custom VM, this tool lets you manage processes on an emulator or device and assists in debugging. You can use it to kill processes, select a specific process to debug, generate trace data, view heap and thread information, take screenshots of the emulator or device, and more.

Android Debug Bridge (adb)
The adb tool lets you install your application’s .apk files on an emulator or device and access the emulator or device from a command line. You can also use it to link a standard debugger to application code running on an Android emulator or device.

Android Asset Packaging Tool (aapt)
The aapt tool lets you create .apk files containing the binaries and resources of Android applications.

Android Interface Description Language (aidl)
Lets you generate code for an interprocess interface, such as what a service might use.

sqlite3
Included as a convenience, this tool lets you access the SQLite data files created and used by Android applications.

Traceview
This tool produces graphical analysis views of trace log data that you can generate from your Android application.

mksdcard
Helps you create a disk image that you can use with the emulator, to simulate the presence of an external storage card (such as an SD card).

dx
The dx tool rewrites .class bytecode into Android bytecode (stored in .dex files.)

UI/Application Exerciser Monkey
The Monkey is a program that runs on your emulator or device and generates pseudo-random streams of user events such as clicks, touches, or gestures, as well as a number of system- level events. You can use the Monkey to stress-test applications that you are developing, in a random yet repeatable manner.

android
A script that lets you manage AVDs and generate Ant build files that you can use to compile your Android applications.

zipalign
An important .apk optimization tool. This tool ensures that all uncompressed data starts with a particular alignment relative to the start of the file. This should always be used to align .apk files after they have been signed.

You can find the details of the Android SDK Tools in the Android Official website:Tools Overview

Be the first to comment - What do you think?  Posted by CuteAndroid - April 12, 2010 at 2:54 pm

Categories: Android, Android developer   Tags: , , , , , ,