How do I export a project in the Android studio?
Follow the below steps to sign the application in the android studio:-
First Go to Build->Generate Signed APK
Then Once you click on the Generate Signed APK then there is info dialog message appear.
Click on the
Create New
button if you don't have any keystore file. If you have click on theChoose Existing
.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.Once you fill complete details then click on the
Ok
button then it redirect to this dialog.Click on the Next button then check mark on the
Run ProGuard
and click on the finish. It generate the signed APK.
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)
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.
Now you should see a prompt to select release build or debug build
.
For production always select release build!
And you are done. Signed APK exported.
PS : Don't forget to increment your versionCode
in manifest file before uploading to playstore :)