Lines Matching full:project
19 <li><a href="#testing">Testing a Library Project</a></li>
33 <dd>An Android project is the container for your application's source code, resource files, and
34 files such as the Ant build and Android Manifest file. An application project is the main type
35 of project and the contents are eventually built into an <code>.apk</code> file that you install on a
51 <p>When you use the Android development tools to create a new project, the essential files and
54 generate your project. As your application grows in complexity, you might require new kinds of
62 required. The following directories and files comprise an Android project:</p>
171 <dt><code>project.properties</code></dt>
173 <dd>This file contains project settings, such as the build target. This file is integral to
174 the project, so maintain it in a source revision control system. To edit project
175 properties in Eclipse, right-click the project folder and select
181 the project, this contains the path to the SDK installation. Because the content of the file
191 to the project, so maintain it in a source revision control system. If you use Eclipse, this
196 <dd>The Ant build file for your project. This is only applicable for projects that
205 <h2>Library project example code</h2>
208 application can use code and resources from an Android Library project. The TicTacToeMain
209 application uses code and resources from an example library project called TicTacToeLib.</p>
221 <p>An Android <em>library project</em> is a development project that holds shared Android
222 source code and resources. Other Android application projects can reference the library project
224 application projects can reference the same library project and any single application project
228 project feature that generates each library project into its own JAR file.
234 can move them to a library project so that it is easier to maintain across applications and
240 single, reuseable set of the same components in a library project.</li>
243 the part of the application that is common to both versions into a library project. The two
244 dependent projects, with their different package names, will reference the library project
248 <p>Structurally, a library project is similar to a standard Android application project. For
249 example, it includes a manifest file at the project root, as well as <code>src/</code>,
250 <code>res/</code> and similar directories. The project can contain the same types of source
251 code and resources as a standard Android project, stored in the same way. For example, source
252 code in the library project can access its own resources through its <code>R</code> class.</p>
254 <p>However, a library project differs from a standard Android application project in that you
256 Similarly, you cannot export the library project to a self-contained JAR file, as you would do
260 <p>When you build an application that depends on a library project, the SDK tools compile the
261 library into a temporary JAR file and uses it in the main project, then uses the
264 priority and that the resource in the library project is not compiled into the application
274 <p>Once you have added references to library projects to your Android project,
284 <p>As you develop your library project and dependent applications, keep the points listed below
289 <p>Since the tools merge the resources of a library project with those of a dependent application
290 project, a given resource ID might be defined in both projects. In this case, the tools select
293 defined in more than one project and will be merged, with the resource from the application or
300 consistent naming scheme that is unique to the project (or is unique across all projects).</p></li>
302 <li><p><strong>You cannot export a library project to a JAR file</strong></p>
308 <li><p><strong>A library project can include a JAR library</strong></p>
310 <p>You can develop a library project that itself includes a JAR library, however you need to
311 manually edit the dependent application project's build path and add a path to the JAR file.</p></li>
313 <li><p><strong>A library project can depend on an external JAR library</strong></p>
315 <p>You can develop a library project that depends on an external library (for example, the Maps
318 library project and the dependent application must declare the external library in their manifest
326 in a library project. Any asset resources
328 project itself. However, resource files saved in the
331 <li><p><strong>Platform version must be lower than or equal to the Android project</strong></p>
333 <p>A library is compiled as part of the dependent application project, so the API used in the
334 library project must be compatible with the version of the Android library used to compile the
335 application project. In general, the library project should use an <a href=
337 than — that used by the application. If the library project uses an API level that is
338 higher than that of the application, the application project will not compile. It is
340 used in an Android 1.6 (API level 4) or Android 2.1 (API level 7) project, for instance.</p></li>
347 <li><p><strong>Each library project creates its own R class </strong></p>
349 <p>When you build the dependent application project, library projects are compiled and
350 merged with the application project. Each library has its own <code>R</code> class, named according
352 project and the library project is created in all the packages that are needed including the main
353 project's package and the libraries' packages.</p></li>
355 <li><p><strong>Library project storage location</strong></p>
357 <p>There are no specific requirements on where you should store a library project, relative to a
358 dependent application project, as long as the application project can reference the library
359 project by a relative link. What is important is that the main
360 project can reference the library project through a relative link.</p></li>
368 access to Android system objects. The file structure of a test project is the same as an
369 Android project.</p>
394 <dd>The Android Manifest for your project. See <a href=
399 element that connects the test project with the application project.</dd>
401 <dt><code>project.properties</code></dt>
403 <dd>This file contains project settings, such as the build target and links to the project being
404 tested. This file is integral to the project, so maintain it in a source
405 revision control system. To edit project properties in Eclipse, right-click the project folder
411 the project, this contains the path to the SDK installation. Because the content of the file
420 the project, so maintain it in a source revision control system.
425 <dd>The Ant build file for your project. This is only applicable for projects that
433 <h2 id="testing">Testing a Library Project</h2>
436 project:</p>
440 project</a> that instruments an application project that depends on the library project. You
441 can then add tests to the project for library-specific features.</li>
443 <li>You can set up a standard application project that depends on the library and put
444 the instrumentation in that project. This lets you create a self-contained project that