diff --git a/docs/html/tools/publishing/app-signing-eclipse.jd b/docs/html/tools/publishing/app-signing-eclipse.jd new file mode 100644 index 0000000000000..738e488683196 --- /dev/null +++ b/docs/html/tools/publishing/app-signing-eclipse.jd @@ -0,0 +1,64 @@ +page.title=Signing Your Applications from Eclipse with ADT +@jd:body + +
Android requires that all apps be digitally signed with a certificate before they can be +installed. Android uses this certificate to identify the author of an app, and the certificate +does not need to be signed by a certificate authority.
+ +This document provides detailed instructions about how to sign your apps in release mode with the +ADT plugin for Eclipse. For information about how to obtain a certificate for signing your app, see +Signing Your Applications. +
+ + +To sign your app for release with ADT, follow these steps:
+ +On the next window, enter the location to create a keystore and a keystore password. If you +already have a keystore, select Use existing keystore, enter your keystore's +location and password, and go to step 6.
+
+Figure 6. Select a keystore in ADT.
+On the next window, provide the required information as shown in figure 5.
+
Your key should be valid for at least 25 years, so you can sign app updates with the same key +through the lifespan of your app.
+
+Figure 7. Create a private key in ADT.
+On the next window, select the location to export the signed APK.
+
+Figure 8. Export the signed APK in ADT.
+Android Studio and the ADT plugin for Eclipse sign your app in debug mode automatically when +
Android Studio signs your app in debug mode automatically when you run or debug your project from the IDE.
You can run and debug an app signed in debug mode on the emulator and on devices connected to your development manchine through USB, but you cannot distribute an app signed in debug mode.
+By default, the debug configuration uses a debug keystore, with a known
+password and a default key with a known password.
+The debug keystore is located in $HOME/.android/debug.keystore, and is created if not present.
+
+The debug build type is set to use this debug SigningConfig automatically.
For more information about how to build and run apps in debug mode, see Building and Running.
@@ -88,7 +94,7 @@ any updates to your app, since you must always sign all versions of your app wit key.The rest of this document provides detailed instructions about how to generate a private -key and sign your apps in release mode with Android Studio and with the ADT plugin for Eclipse.
+key and sign your apps in release mode with Android Studio.You can also specify your signing settings in Gradle configuration files. For more information, -see Signing settings.
+see Signing settings. -To sign your app in release mode in ADT, follow these steps:
- -On the next window, enter the location to create a keystore and a keystore password. If you -already have a keystore, select Use existing keystore, enter your keystore's -location and password, and go to step 6.
-
-Figure 6. Select a keystore in ADT.
-On the next window, provide the required information as shown in figure 5.
-
Your key should be valid for at least 25 years, so you can sign app updates with the same key -through the lifespan of your app.
-
-Figure 7. Create a private key in ADT.
-On the next window, select the location to export the signed APK.
-
-Figure 8. Export the signed APK in ADT.
-You do not need Android Studio or the ADT plugin for Eclipse to sign your app. You can sign +
You do not need Android Studio to sign your app. You can sign your app from the command line using standard tools from the Android SDK and the JDK. To sign an app in release mode from the command line:
diff --git a/docs/html/tools/publishing/preparing.jd b/docs/html/tools/publishing/preparing.jd index 5265fce93d918..b6b10fb4dd886 100644 --- a/docs/html/tools/publishing/preparing.jd +++ b/docs/html/tools/publishing/preparing.jd @@ -82,10 +82,10 @@ and it is optimized with the zipalign tool.The signing and optimization tasks are usually seamless if you are building your application with -Eclipse and the ADT plugin or with the Ant build script (included with the Android SDK). For -example, you can use the Eclipse Export Wizard to compile, sign, and optimize your application all -at once. You can also configure the Ant build script to do the same when you build from the command -line.
+Android Studio. For example, you can use Android Studio with the Gradle build files to compile, sign, +and optimize your application all at once. You can also configure the Gradle build files to do the +same when you build from the command line. For more details about using the Gradle build files, see +Building Your Project with Gradle.To prepare your application for release you typically perform five main tasks (see figure 2). Each main task may include one or more smaller tasks depending on how you are releasing your @@ -114,8 +114,8 @@ developer holds the private key). The Android system uses the certificate as a m the author of an application and establishing trust relationships between applications. The certificate that you use for signing does not need to be signed by a certificate authority; the Android system allows you to sign your applications with a self-signed certificate. To learn about -certificate requirements, see Obtain a -suitable private key.
+certificate requirements, see Signing Your +Applications.Important: Your application must be signed with a cryptographic key whose validity period ends after 22 October 2033.
@@ -226,9 +226,9 @@ tasks: release. -Verify that the following manifest items are set correctly:
+Verify that the following manifest and build files items are set correctly:
-There are several additional manifest elements that you can set if you are releasing your +
There are several additional manifest or build file elements that you can set if you are releasing your
application on Google Play. For example, the After you finish configuring your application you can build it into a release-ready
-android:minSdkVersion and
android:targetSdkVersion attributes, which are located in the <uses-sdk> element. For more
@@ -303,38 +303,24 @@ application, see Applicatio
Building Your Application for Release
.apk fle that is signed and optimized. The JDK includes the tools for signing the
+.apk file that is signed and optimized. The JDK includes the tools for signing the
.apk file (Keytool and Jarsigner); the Android SDK includes the tools for compiling and
-optimizing the .apk file. If you are using Eclipse with the ADT plugin or you are using
-the Ant build script from the command line, you can automate the entire build process..apk file. If you are using Android Studio or you are using
+the Gradle build system from the command line, you can automate the entire build process. See
+Building Your Project with Gradle.
You can use the Eclipse Export Wizard to build a release-ready .apk file that is
-signed with your private key and optimized. To learn how to run the Export Wizard, see
-Compile and sign with Eclipse
-ADT. The Export Wizard compiles your application for release, signs your application with your
-private key, and optimizes your application with the zipalign tool. The Export Wizard should run
-successfully if you have run or debugged your application from Eclipse and you have no errors in
-your application (see Building
-and Running from Eclipse with ADT for more information.
You can use the Gradle build system, integrated with Android Studio to build a release-ready
+.apk file that is signed with your private key and optimized. To learn how to setup and
+run builds from Android Studio, see
+Building Your Project with Gradle.
The Export Wizard assumes that you have a certificate and private key +
The build process assumes that you have a certificate and private key suitable for signing your application. If you do not have a suitable certificate and private key, -the Export Wizard will help you generate one (see -Signing Your Applications for more -information about the signing process and signing guidelines.
+Android Studio can help you generate one. For more information about the signing process, see +Signing Your Applications. -You can use the Ant build script (included in the Android SDK) to build a release-ready
-.apk file that is signed with your private key and optimized. To learn how to do this,
-see Building in
-Release Mode. This build method assumes you have a certificate and
-private key suitable for signing your application. If you do not have a suitable certificate and
-private key, the Export Wizard will help you generate one (see
-Signing Your Applications for more
-information about the signing process and signing guidelines.
If you are using Gradle build files, you can use the release build type to set + your build settings for the published version of your app.
The Android Development Tools (ADT) plugin and the Ant build script that are provided - with the Android SDK tools provide everything you need to build and sign a release version of - your application.
+You can use the Gradle build files with the release build type to build and sign a + release version of your application. See + Building Your Project with Gradle.
Before you distribute your application, you should thoroughly test the release version on at diff --git a/docs/html/tools/publishing/versioning.jd b/docs/html/tools/publishing/versioning.jd index 6d3ec2f99fb07..f56dbc318155a 100644 --- a/docs/html/tools/publishing/versioning.jd +++ b/docs/html/tools/publishing/versioning.jd @@ -95,7 +95,8 @@ value for display to users.
You define both of these version attributes in the
-<manifest> element of the manifest file.
<manifest> element of the manifest file or the Gradle build file. See
+Building Your Project with Gradle.
Here's an example manifest that shows the android:versionCode
and android:versionName attributes in the
@@ -171,4 +172,6 @@ maximum API Level.
For more information, see the <uses-sdk>
manifest element documentation and the API Levels document.