After ADK 4.0, use Eclipse to create a project file.
. Project
Project files and project structures are defined in them.
<?xml version="1.0" encoding="UTF-8"?><projectDescription><name>XAlbum</name><comment></comment><projects></projects><buildSpec><buildCommand><name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name><arguments></arguments></buildCommand><buildCommand><name>com.android.ide.eclipse.adt.PreCompilerBuilder</name><arguments></arguments></buildCommand><buildCommand><name>org.eclipse.jdt.core.javabuilder</name><arguments></arguments></buildCommand><buildCommand><name>com.android.ide.eclipse.adt.ApkBuilder</name><arguments></arguments></buildCommand></buildSpec><natures><nature>com.android.ide.eclipse.adt.AndroidNature</nature><nature>org.eclipse.jdt.core.javanature</nature></natures></projectDescription>
1. Project name <name> </name>
2. Project Description <comment> </comment>
3. Additional Eclipse plug-ins <natures> </natures> and their loading methods <buildSpec> </buildSpec>
. Classpath
Defines the $ CLASSPATH used by the project during compilation.
<?xml version="1.0" encoding="UTF-8"?><classpath><classpathentry kind="src" path="src"/><classpathentry kind="src" path="gen"/><classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/><classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/><classpathentry kind="output" path="bin/classes"/></classpath>
1. Location of the source file (. java) (kind = "src ")
2. system environment for running the project (kind = "con ")
3. Project output directory (kind = "output ")
AndroidManifest. xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.arcsoft.xalbum" android:versionCode="1" android:versionName="1.0" > <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="15" /> <application 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>
Describe the project version and the ADK information used, describe the information of activity, service, and provider, and define the application permissions.
Proguard-project.txt
# To enable ProGuard in your project, edit project.properties# to define the proguard.config property as described in that file.## Add project specific ProGuard rules here.# By default, the flags in this file are appended to flags specified# in ${sdk.dir}/tools/proguard/proguard-android.txt# You can edit the include path and order by changing the ProGuard# include property in project.properties.## For more details, see# http://developer.android.com/guide/developing/tools/proguard.html# Add any project specific keep options here:# If your project uses WebView with JS, uncomment the following# and specify the fully qualified class name to the JavaScript interface# class:#-keepclassmembers class fqcn.of.javascript.interface.for.webview {# public *;#}
Android provides a mechanism to prevent the Application apk from being reverse engineered by disrupting the code and compressing it to prevent cracking. (Started only in Release)
See http://developer.android.com/guide/developing/tools/proguard.html for details
Project. properties
# This file is automatically generated by Android Tools.# Do not modify this file -- YOUR CHANGES WILL BE ERASED!## This file must be checked in Version Control Systems.## To customize properties used by the Ant build system edit# "ant.properties", and override values to adapt the script to your# project structure.## To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt# Project target.target=android-16
In addition, A \ libs \ android-support-v4.jar file is added to the project after 4.0, which is used when the class provided in the new version of ADK is used in the project, it can be used when running on an earlier version of the system. Because this jar contains the definition and declaration of these new classes, it can be used by the application to load the old version of the system by using additional libraries. See http://developer.android.com/tools/extras/support-library.html for details