First, build the environment 1. Installing the JDK and Android SDK 2. Configure Environment variablesD:\android-sdk-windows\toolsC:\Program Files\java\jdk1.6.0_20\bin3. Example InformationProject directory: D:\ProjectDemoSDK Directory: D:\android-sdk-windows\platforms\android-8\Second, the command line to compile the
Document directory
1.
Step 1: Set the simulator to support sdcard
Step 2: Set permissions in the Application
Note:
Suggestion:
There are multiple ways to store data, such as database storage, sharedpreferences storage, and file storage;
Here we will introduce the simplest file storage method;
In simple terms, file storage is the IO stream in the general
Resource Access in Android Resources in Android refer to non-code parts and external files.Generally, native files are stored in assets. For example, MP3 files cannot be directly accessed by Android programs. They must be read in the form of binary streams through the AssetManager class.Resources in res can be directly accessed through the R Resource class.The R
filtered getname () The string returned whether there is ". /”:2, dynamic link library file libdolphin.so, and is not placed in the Application Data Lib directory, but placed in the files directory:The place where the load is used is the searchredirector in the Com.dolphin.browser.search.redirect package:The app uses System.load () to load libdolphin.so instead of system.loadlibrary (), in Android, System.
is part of the media/download system.These test keys is used strictly in development, and should never be assumedTo convey any sort of validity. When $BUILD _secure=true, the code should notHonor these keys in any context.Signing using the OpenSSL commandline (for Boot/system images)--------------------------------------------------------------1. Convert pk8 format key to PEM format% OpenSSL pkcs8-inform der-nocrypt-in testkey.pk8-out Testkey.pem2. Create a signature using the PEM format key% O
is part of the media/download system.These test keys is used strictly in development, and should never be assumedTo convey any sort of validity. When $BUILD _secure=true, the code should notHonor these keys in any context.Signing using the OpenSSL commandline (for Boot/system images)--------------------------------------------------------------1. Convert pk8 format key to PEM format% OpenSSL pkcs8-inform der-nocrypt-in testkey.pk8-out Testkey.pem2. Create a signature using the PEM format key% O
abstract In fact, the operation of the Android file and Java in the PC environment is not two, the reason why need to be explained separately is because the Android system provides different from the PC to access the file system root path of the API, while the application of a private
A few words.
Using Gradle and its recommended project framework
Put sensitive data such as passwords into Gradle.properties
Do not write HTTP clients yourself, use volley or okhttp libraries
Use the Jackson Library to parse JSON data
Avoid guava and Dalvik 65K methods limit do not use too many libraries
Using fragment to draw UI interfaces
Activity is mainly used to manage fragment
Layout file XML is also code, organize the
1. Structure of the android File SystemAfter the android source code is compiled, the system. IMG, ramdisk. IMG, and userdata. IMG image files are obtained.
Ramdisk. IMG is the file system of emulator. IMG includes the main packages, libraries, and other files, userdata. IMG includes user data. After loading these thre
installation package. In Windows, it is difficult to extract installed programs into an installation package. However, Android and Windows are very different. We can extract installed apps from Android as the Apk installation package. Let's take a look at how to do it.
Extract Apk directly from the root directory
Download the new version of manager series software:
RE
Android sdcard storage solution (based on wrapfs File System)
The previous two articles mainly describe the fuse-based sdcard storage solution for android. For details, refer:
Android sdcard storage solution (based on fuse file system): One and
:–files which is placed in the assets folder–property files containing configuration data–images which can be replaced–styling Information Resourcesand similar.My personal use case is:I had created an Android application using SAP Netweaver Gateway Productivity Accelerator.I had to deliver the application to my users as. apk file.But there is the requirement that they wanted to modify the ready application (change configuration data).So I had the ach
Original link: http://m.blog.csdn.net/article/details?id=17725989abstract In fact, the operation of the Android file and Java in the PC environment is not two, the reason why need to be explained separately is because the Android system provides different from the PC to access the file system root path of the API, whil
For Android files, you must have the following permissions:
View plaincopy to clipboardprint?
File Operations under the SD card:
1. Determine whether the SD card is inserted
View plaincopy to clipboardprint?Environment. getexternalstoragestate (). Equals (Android. OS. environment. media_mounted );Environment. getexternalstoragestate (). Equals (
In an Android system, all the code for an app is inside a dex file. Dex is a jar-like archive that stores many Java-compiled bytecode. Because the Android system uses the Dalvik virtual machine, you need to convert the class file that was compiled with Java compiler into a class fi
String getfromassets (string filename ){Try {Inputstreamreader inputreader = new inputstreamreader (getresources (). getassets (). Open (filename ));Bufferedreader bufreader = new bufferedreader (inputreader );String line = "";String result = "";While (line = bufreader. Readline ())! = NULL)Result + = line;Return result;} Catch (exception e ){E. printstacktrace ();}}Of course, if you want to get the memory stream, you can also directly return the memory stream! Next, create a new project
1. If the database file is larger than 1 MB, use the Filesplit tool to cut. First download the software tool 2. first put the existing database under the assets folder. If this file does not exist, create this folder in the android project. The Code is as follows: import java. io. File;Import java. io. FileOutputStream
Four storage methods for Android data: SharedPreferences, SQLite, Content Provider, and File (2) -- SQLite and androidsqlite
SQLite is a lightweight database designed for embedded devices. It has only five data types:
NULL: NULL
INTEGER: INTEGER
REAL: Floating Point Number
TEXT: String
BLOB: Big Data
In SQLite, the BOOLEAN and DATE types are not specifically designed, because the BOOLEAN type can replace tr
Based on the information available, you 've got an XML error, and it's on line 2 of COM. mmiku. todolist. todolistitemview. because the com. mmiku. todolist. error Caused by todolistitemview not found. correct.
11-30 01:45:52. 610: E/androidruntime (545): Android. View. inflateexception: Binary XML file line #2: Error inflating class com. mmiku. todolist. todolistitemview
11-30 01:45:52. 610: E/androidrunti
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.