Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does IntelliJ IDEA publish an Android app with one click?

On Android developer's page (http://developer.android.com/guide/publishing/app-signing.html) there is a tutorial on publishing which says that an app has to be compiled as an unsigned app, a private key must be generated with keytool then signed with jarsigner.

How do we create an unsigned app with IntelliJ?

Alternatively, can we do all these steps via Tools->Android->Export Signed Android Package?

Thanks in advance!

like image 659
sandalone Avatar asked May 05 '11 11:05

sandalone


People also ask

Can I develop Android app using IntelliJ IDEA?

Create a new Android project Launch IntelliJ IDEA. On the Welcome screen, click New Project. If you already have a project open, from the main menu select File | New | Project. In the New Project wizard, select Android on the left.

Is IntelliJ IDEA better than Android Studio?

IntelliJ vs. Android Studio. In fact, the they are very similar, Android Studio is based on the IntelliJ IDEA, which is a more general IDE tool and allows you to create code for a wider range of platforms. Android studio, as many of the name implies, is specialized just for the Android platform.

Do I need Android Studio if I have IntelliJ IDEA?

If I'm already a user of IntelliJ IDEA, do I need to switch to Android Studio for Android development? No. Android Studio is focused specifically on Android development and provides streamlined environment and project setup, but otherwise all of its features are available in IntelliJ IDEA.

Which is the official IDE for Android app development based on IntelliJ IDEA?

Android Studio is the official Integrated Development Environment (IDE) for Android app development, based on IntelliJ IDEA .


2 Answers

New IDEA versions have an option to generate unsigned APK in the Android Facet settings, Compiler tab:

Generate unsigned APK

However you don't need to do that if you use the Export Signed Android Package feature:

Tools | Android | Export Signed Android Package will generate the release version of your application signed with the release key and ready for Market.

You can also create a batch file that will sign the unsigned APK and configure it as an External Tool in IDEA so that you can generate it in one click or via keyboard shortcut (if you are OK with a batch file containing your keystore passwords in open text).

I use such script to generate the signed APK, upload it to a phone and start the main Activity to perform application testing, it has the following sequence of actions:

  1. jarsigner
  2. zipalign
  3. adb install
  4. adb start

EDIT 2013/2/8: The option to export a Signed APK is now under Top Menu > Build > Generate Signed APK (IntelliJ IDEA 12)


IDEA 12 has even better way to do it via artifact, configured like this:

artifact

Then use Build | Build Artifacts when you need to make a release version.

like image 192
CrazyCoder Avatar answered Sep 21 '22 18:09

CrazyCoder


Well you could modify the ant scripts slightly and have one target which builds a final signed APK. So that technically could be a one click build. Not sure about publishing, you may be restricted to using the web interface to upload and publish the app.

I wrote a tutorial on publish, it might be worth a read as I cover some of the building final releases and such

like image 25
Jimmy Avatar answered Sep 18 '22 18:09

Jimmy