Publishing an App Inventor App on the Android Market. - Simply Android: "An EASY HowTO to get your app published and on the market in under 10 minutes (as long as your internet connection does not suck.)
Make sure you have all the tools
Android SDK: http://developer.android.com/sdk/index.html
Java JDK 1.6: http://www.oracle.com/technetwork/java/javase/downloads/jdk6-jsp-136632.html
apkTool : http://code.google.com/p/android-apktool/downloads/list
Pre Step: Note You Can Skip This Step If You Already Sign Android Applications For The Market
To Sign android applications for the market you will need a Private Key, used by jarsigner in the Java JDK. This is the basic process to create a KeyStore - I will not list every Operating System here, this is a very basic explanation for Windows Users.
Pre.A: CD to the JDK/bin path. (c:\program files\sun\jdk 1.6\bin)
Pre.B: Run the following command to create a key to sign your apps with for release on the market. Hint: Change the AliasName to something easy to remember. You can also change the keystore name to create. Once this file is created, BACK IT UP, its good practice not to lose the key :) .
keytool.exe -genkey -v -keystore my-release-key.keystore -alias aliasname -keyalg RSA -keysize 2048 -validity 10000
Step 1: Create your application in App Inventor, go through your paces with testing and get something ready you want to publish and release to the masses. Don't start this tutorial to make a Whack A Nerdy game ;-), give us something good! Do all the work to make your app in App Inventor. Including icon work etc.
Step 2: Package your application to Download to the Local Computer.
Step 3: Open a Command Window/Terminal Window. With the Unpacked apkTool we will decompile the APK without decompiling source. The apk will be extracted into the the directory you are currently in. I recommend creating a folder and dumping APKTOOL into it, as well as your APK you are working on. Then CD into that directory and run the command.
APKTOOL d -s YOURAPKNAME.apk
Step 4: Edit the Manifest, this will be located in a folder with the same name as your APK, the file is called AndroidManifest.xml this is the guy that isn't being built correctly. We need to add a few Attributes, Remove one, and Move one, and add a tag. Lets begin!
4.a
You need to add the portions that are bolded, to the MANIFEST tag. versionCode and versionName are required for Android Market to determine the versioning of your application, this is used when pushing out updates for your app, modify them if this is an update.
installLocation is used to allow your app to be placed on the SD Card for Froyo+ users.
4b. You need to specify which version of Android your application will run on Minimally. Add the following line directly below the Manifest Tag (the one we worked on above). You can find a list of SdkVersion and Android Versions here
4c. Now we need to fix a broken Icon Reference, or App Market will spit on your submission! Currently the line looks something like this.
Cut the attribute android:icon='@drawable/ya' so that it is no longer in that line. Then paste it into the line below, and remove android:debuggable at the same time.
Your new manifest should look like this.
..
..
..
ToxigenicpoemToxigenicpoem December 2010 Permalink
Step 5. Rebuild the application, starting in your command window from the same parent directory of YOURDECOMPILEDAPP run the following command against apktool
APKTOOK b YOURDECOMPILEDAPPDIRECTORY YOURAPPOUTPUT.APK
Now you should have a nice apk. If you opened it in a ZIP program you would be missing a META-INF folder, so we are still not done, but we are close!
Step 6. Sign your application. CD to the JDK/bin path. (c:\program files\sun\jdk 1.6\bin) and run the following command. Be prepared to provide the password you used to generate the keystore in the prestep. Obviously substitute your keystore if you already sign apps for the market. Make sure you change the aliasname and keystore name if you modified them from the prestep, modify apkname.apk to point to your APK.
jarsigner.exe -verbose -keystore my-release-key.keystore apkname.apk aliasname
If you want to verify the the sign was ok
jarsigner.exe -verify -verbose -certs apkname.apk
Step 7 Almost done! Lets ZipAlign the APK
cd to the AndroidSDK\tools directory. (you should have generally installed this to c:\android\tools) then run the zip align command
zipalign -v 4 input.apk output.apk
Step 8 Now take the output.apk and upload it to Google App Market, Share your creation!
- 已使用 Google 工具列寄出"