I'm developing an Android app with the Android Developer Tool. Now I tried the new Android Studio, everything works fine if connect my smartphone with the PC and directly run the program in the Android Studio. But now I want to test the program with other smartphones without connecting them to my PC.
The ADT creates the .apk file under "projectname/bin" every time you compile the program. How I see it at the moment, Android Studio doesn't do that.
So, my question is: Is it possible to create an unsigned .apk file with Android Studio?
Open the Settings app on your Android device. Tap the “Security” option in the Personal section. Tap the check box next to Unknown Sources. This enables your device to install unsigned, third-party apps from sources other than the Google Play app store.
If you need to install such an app for your Android device, you can still do so, but you'll need to enable settings inside Android that enable you to install unsigned third-party apps. These settings are located inside the Android Settings app.
Creating an APK file First, open up your project or application that you want to import into an APK file. Then, select Build > Build Bundle(s)/APK(s) > Build APK(s) from the toolbar menu. Android Studio will take a few moments to generate an APK file.
Unsigned Apk, as the name suggests it means it is not signed by any Keystore. A Keystore is basically a binary file that contains a set of private keys. Every App that we install using the Google Play App Store needs to be signed with a Keystore.
I would recommend you to build your APK file with Gradle:
assemble
Your unsigned APK is now located in
ProjectName\app\build\outputs\apk
For detailed information on how to use Gradle, this tutorial is good to go: Building with Gradle in Android Studio. I also wrote a blog post on how to build an unsigned APK with Gradle.
If you moved your project from the other IDE and don't want to recompile, you may find your APK file that was already built in the IDE you moved from:
If you generated the Project with Android Studio, the APK file will be found in ProjectName/ProjectName/build/apk/...
Imported the project from eclipse: File should be in the same directory. Go to Project
- Show in Explorer
. There you should find the bin folder where your APK file is located in.
Imported from IntelliJ, the location would be ProjectName/out/production/...
Side note: As Chris Stratton mentioned in his comment:
Technically, what you want is an APK signed with a debug key. An APK that is actually unsigned will be refused by the device.
According to Build Unsigned APK with Gradle you can simply build your application with gradle. In order to do that:
Edit configurations
alt+insert
Gradle
Gradle project
Tasks:
enter assemble
OK
After that you should find your unsigned 'apk' in directory ProjectName\app\build\outputs\apk
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With