How do I export a project in the Android studio?
Asked Answered
H

4

189

How do I export project in the Android Studio? I mean, like I used to do in Eclipse by File|Export..

Hephzipah answered 18/5, 2013 at 9:44 Comment(0)
H
112

From the menu:

Build|Generate Signed APK

or

Build|Build APK

(the latter if you don't need a signed one to publish to the Play Store)

Hephzipah answered 18/5, 2013 at 10:1 Comment(1)
For all the people who don't know where the created apk is : root_Of_Your_Application\app\build\outputs\apk\debugMolloy
T
319

Follow the below steps to sign the application in the android studio:-

  1. First Go to Build->Generate Signed APK

    First screenshot

  2. Then Once you click on the Generate Signed APK then there is info dialog message appear.

    Second screenshot

  3. Click on the Create New button if you don't have any keystore file. If you have click on the Choose Existing.

    This screenshot

  4. Once you click on the Create New button then now dialog box appear where you need to enter the keystore file info, other signing authority details.

    Fourth screenshot

  5. Once you fill complete details then click on the Ok button then it redirect to this dialog.

    Fifth screenshot

  6. Click on the Next button then check mark on the Run ProGuard and click on the finish. It generate the signed APK.

    Sixth screenshot

    Seventh screenshot

Tangier answered 9/11, 2013 at 12:42 Comment(7)
For whatever reason when i follow your instructions and try to upload my app to the play store it says that ive generated a debug apk. Any idea why that might be happening? Thanks!Stab
I have updated the answer and You have to add this in application tag android:debuggable="false" of AndroidManifest.xmlTangier
Hi TGMClans - I faced the same problem and tried adding the "android:debuggable="false"" but still generates a debug apk. please advise.Telesthesia
I got the same problem. The "android:debuggalbe=false" doesn't work.Petrolic
Now "android:debuggalbe=false" is not needed and you can select build type when exporting a signed APK.Burlesque
It's best to leave out the android:debuggable attribute from the manifest. If you do, then the tools will automatically insert android:debuggable=true when building an APK to debug on an emulator or device. And when you perform a release build, such as Exporting APK, it will automatically set it to false. If on the other hand you specify a specific value in the manifest file, then the tools will always use it. This can lead to accidentally publishing your app with debug information. ANDROID STUDIO 0.8.14Perusse
FileNotFoundException when click on Okay.Vitellus
H
112

From the menu:

Build|Generate Signed APK

or

Build|Build APK

(the latter if you don't need a signed one to publish to the Play Store)

Hephzipah answered 18/5, 2013 at 10:1 Comment(1)
For all the people who don't know where the created apk is : root_Of_Your_Application\app\build\outputs\apk\debugMolloy
P
10

Firstly, Add this android:debuggable="false" in the application tag of the AndroidManifest.xml.

You don't need to harcode android:debuggable="false" in your application tag. Infact for me studio complaints -

Avoid hardcoding the debug mode; leaving it out allows debug and release builds to automatically assign one less... (Ctrl+F1)

It's best to leave out the android:debuggable attribute from the manifest. If you do, then the tools will automatically insert android:debuggable=true when building an APK to debug on an emulator or device. And when you perform a release build, such as Exporting APK, it will automatically set it to false. If on the other hand you specify a specific value in the manifest file, then the tools will always use it. This can lead to accidentally publishing your app with debug information.

The accepted answer looks somewhat old. For me it asks me to select whether I want debug build or release build.

Go to Build->Generate Signed APK. Select your keystore, provide keystore password etc.

enter image description here

Now you should see a prompt to select release build or debug build.

For production always select release build!

enter image description here

And you are done. Signed APK exported.

enter image description here

PS : Don't forget to increment your versionCode in manifest file before uploading to playstore :)

Psychosis answered 7/6, 2015 at 15:14 Comment(0)
D
3

1.- Export signed packages:

  • Use the Extract a Signed Android Application Package Wizard (On the main menu, choose Build | Generate Signed APK). The package will be signed during extraction.

    OR

  • Configure the .apk file as an artifact by creating an artifact definition of the type Android application with the Release signed package mode.

2.- Export unsigned packages: this can only be done through artifact definitions with the Debug or Release unsigned package mode specified.

Denial answered 18/5, 2013 at 10:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.