Files
android_development/samples/SkeletonApp
Paul Duffin aa592fea27 Stop statically including legacy-android-test
Statically including legacy-android-test leads to duplicate classes
which causes build time problems (with Proguard) and runtime problems on
older SDK versions. This change:
* Stops statically including legacy-android-test.
* Adds compile time dependencies on andoid.test.base, android.test.mock
  and android.test.runner where necessary.
* Adds <uses-library android:name="android.test.runner"/> to any
  affected package to ensure that the classes that were included by
  legacy-android-test are still available at runtime. That also adds a
  dependency on android.test.base and android.test.mock.

The following change descriptions were generated automatically and so
may be a little repetitive. They are provided to give the reviewer
enough information to check the comments match what has actually been
changed and check the reasoning behind the changes.

* samples/ApiDemos/tests/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in ApiDemosTests results
    in duplicate classes which leads to build time and compile time
    issues.

* samples/BrokenKeyDerivation/tests/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in
    BrokenKeyDerivationTests results in duplicate classes which leads
    to build time and compile time issues.

* samples/HelloActivity/tests/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in HelloActivityTests
    results in duplicate classes which leads to build time and compile
    time issues.

* samples/LunarLander/tests/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in LunarLanderTests
    results in duplicate classes which leads to build time and compile
    time issues.

* samples/SkeletonApp/tests/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in SkeletonAppTests
    results in duplicate classes which leads to build time and compile
    time issues.

* samples/Snake/tests/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in SnakeTests results in
    duplicate classes which leads to build time and compile time
    issues.

* samples/Vault/Android.mk
    Removed legacy-android-test from LOCAL_STATIC_JAVA_LIBRARIES
    because statically including the classes in Vault results in
    duplicate classes which leads to build time and compile time
    issues.

    Added 'android.test.runner.stubs' to LOCAL_JAVA_LIBRARIES because
    Vault's source depends on its classes and because of these changes
    they are no longer present on the compilation path.

* samples/Vault/AndroidManifest.xml
    Add uses-library for android.test.runner because otherwise this
    change would change the set of files available to Vault at runtime.

Bug: 30188076
Test: make checkbuild
Change-Id: I9f42f9216b7a40f1f139699e9c4df04325d577a1
2017-12-12 15:24:57 +00:00
..

Android Skeleton App
~~~~~~~~~~~~~~~~~~~~


This directory contains the full implementation of a basic application for
the Android platform, demonstrating the basic facilities that applications
will use.  You can run the application either directly from the "test"
list in the app launcher (it is named Skeleton App) or by selecting it from
the top list in the Sample Code app.

The files contained here:


AndroidManifest.xml

This XML file describes to the Android platform what your application can do.
It is a required file, and is the mechanism you use to show your application
to the user (in the app launcher's list), handle data types, etc.


src/*

Under this directory is the Java source for for your application.


src/com/android/skeletonapp/SkeletonActivity.java

This is the implementation of the "activity" feature described in
AndroidManifest.xml.  The path each class implementation is
{src/PACKAGE/CLASS.java}, where PACKAGE comes from the name in the <package>
tag and CLASS comes from the class in the <activity> tag.


res/*

Under this directory are the resources for your application.


res/layout/skeleton_activity.xml

The res/layout/ directory contains XML files describing user interface
view hierarchies.  The skeleton_activity.xml file here is used by
SkeletonActivity.java to construct its UI.  The base name of each file
(all text before a '.' character) is taken as the resource name;
it must be lower-case.


res/drawable/violet.png

The res/drawable/ directory contains images and other things that can be
drawn to the screen.  These can be bitmaps (in .png or .jpeg format) or
special XML files describing more complex drawings.  The violet.png file
here is used as the image to display in one of the views in
skeleton_activity.xml.  Like layout files, the base name is used for the
resulting resource name.


res/values/colors.xml
res/values/strings.xml
res/values/styles.xml

These XML files describe additional resources included in the application.
They all use the same syntax; all of these resources could be defined in one
file, but we generally split them apart as shown here to keep things organized.