In the Beginning There Was the Root and It Was Good

The root of all manifest files is, not surprisingly, a manifest element:

<manifest xmlns:android="" package="">


Note the namespace declaration. Curiously, the generated manifests apply it only on the attributes, not the elements (e.g., it's manifest, not android:manifest). However, that pattern works, so unless Android changes, stick with their pattern.

The biggest piece of information you need to supply on the manifest element is the package attribute (also curiously not namespaced). Here you can provide the name of the Java package that will be considered the "base" of your application. Then, everywhere else in the manifest file that needs a class name, you can just substitute a leading dot as shorthand for the package. For example, if you needed to refer to in our example manifest, you could just use .Snicklefritz since is defined as the application's package.

0 0

Post a comment