Basic Android learning-Build a development environment and HelloWord (1)
Before building an Android development environment, let's take a brief look at Android.Android is a free and open source operating system based on linux developed in java and mainly used on mobile devices.The following four tools are required to build an
1. Establish the environment
Ubuntu + eclipse + ADT
2. Is Android startup slow?
No way, it is really slow. Wait. It is generally said that it will not be closed after the first time, but the deployment will be much faster in the future. After testing, it is indeed faster. What I cannot accept most is that even clicking the Home Key is very slow.
3. R. layout. Main cannot be resolved
This error occur
Use of the Picasso framework for obtaining and Displaying Remote images in Android (1 ),
Reprinted please indicate the source: mingsang Android
In Android development, you often need to obtain images remotely and display them on the client. Of course, you can use native HttpUrlConnection and AsyncTask operations, b
, and more interaction is generated between these components. We can regard Fragment as a "small Activity", which is more concise.
Ii. simple use of Fragment
Then we will explain how to simply display two Fragment instances.
1. Add Fragment in XML:
Create Fragment1 and Fragment2. (Note: You may have two packages to import to android. app. fragment or android
also search for this entry from Google Code.
We use apktool to decompile the apk to obtain the source code and images, XML configuration, language resources, and other files in the apk application. So how to use apktool, we will briefly introduce the following (here refer to the documentation provided on Google Code, view the original documentation, please move to the https://code.google.com/p/android-apktool/wiki/ApktoolOptions ):
In the latest Android 4.0.3 R2 simulator, GPU support has been added to support the OpenGL ES 2.0 standard, allowing developers to use the simulator to test their own OpenGL games. After camera support was added last year, the new version of the simulator now supports multi-touch input devices. In the future, Bluetooth and NFC support will be added.
◆ QVGA (240x320, low density, small screen)
◆ WQVGA400 (240x400, low density, normal screen)
◆ WQVGA432
First, Android junit Runner introduction 1.Android junit Runner1) is a test runner for running Junit3 and JUNIT4 Android test packages2) Replace the instrumentation test Runner (an older test runner)3) Support Instrumentation Test Runner all features, but extended4) maintains all instrumentation Test Runner command for
How to correctly enable isLoggable in Android 5.0 (1) _ Usage Details, androidisloggableWhat is isLoggable?
In the Android source code, we often see the following code:
//packages/apps/InCallUI/src/com/android/incallui/Log.javapublic static final String TAG = "InCall";public static final boolean DEBUG = android.util.Lo
your own refresh.
For this boot. IMG, the basic idea is to compile the android kernel code, generate the kernel image, and then use mkbootimg to refer to the following two wiki websites:Http://android-dls.com/wiki/index.php? Title = HOWTO: _ unpack % 2c_edit % 2c_and_re-pack_boot_images
Http://android-dls.com/wiki/index.php? Title = replace_recovery_partition
Th
system or using Oracle VM VirtualBox. I will not talk about installing the dual-system here. You can check it online. Here is a link for your reference: http://jingyan.baidu.com/article/76a7e409bea83efc3b6e1507.html. To install Ubuntu through Oracle VM VirtualBox in a Windows environment, see: http://jingyan.baidu.com/article/db55b609909c084ba20a2f5e.html
Note:
(1) it must be Windows 7. If it is Windows 8,
. Create a folder libs in the current directory.
6 decompress rokon_lib_x-y-z.zip to this
7. Update the newly created Android project, right-click to update the project, or press F5.
8. Ensure the file location is correct, as shown in figure
9 Add the rokon_x-y-z.jar to your build path (right-click the project, select bulid path, and click Add to build path). If it is correct, you will see that it app
). sendToTarget (); // The image is obtained successfully and MSG_SUCCESS ID and bitmap object are sent to the ui thread.6364 // mImageView. setImageBitmap (bm); // error! You cannot operate the ui element in a non-ui thread.6566 // mImageView. post (new Runnable () {// another more concise method for sending messages to the ui thread.67 //68 // @ Override69 // public void run () {// run () method will be executed in the ui thread70 // mImageView. setImageBitmap (bm );71 //}72 //});73}74 };7576}
Introduced
Build Android's development environment and write a simple sample program
Build Android development environment under Windows
Directory structure description of Android project
Write a simple Hello world program
First, build the Android development environment under Windows
1. Install JDK (Java Develop
Preface:
What is APK?"Application package file"
Simply put, the compiled files and resource files are packaged together in a zip container. Let's just get to know it.
It usually contains the following directories and files:
1. META-INF \ store the signature key;
2. Res \ stores the resource files not compiled into resources. ARSC;
3. Lib \ stores the compilation code of specific software and shares library files;
4. The global configuration file of th
Create an android ORM framework opendroid (1) -- use of the orm framework, ormopendroid
I. My opinion
I remember a blog about the use of litepal. In this blog, I mentioned that the APIS provided by android have been encapsulated enough, I don't need any ORM framework at all, but after using litepal, I feel it is necessary to use the ORM framework. The following a
source code, so there is no need to wait a long time to downloadAndroidsource code of the directory, there are two methods: usingreop SyncTo use or command;git cloneorder;4.compilingAndroidYou need to call the source codeandroid.mkfile to compile the current project: (1) initializes the compilation environment;2) Select the target;3) CompileAndroidsource code;5.outdirectory structure analysis;6.will own theAPKpublished as a built-in program, this wil
Android sqlite (1)
The Android operating system uses the SQLite database. There are two ways to obtain database objects:
1. Obtain an existing database
SQLiteDatabase dbbrndi=SQLiteDatabase.openDatabase("/sdcard/zhycheng.db3", null,SQLiteDatabase.OPEN_READONLY);
The first String parameter is the location of the datab
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.