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 r
In Android Studio:
Build
Build APK(s)
Wait and go to the location shown in a pop-up window. On right bottom side
Step 1 Open android studio . Build -> Generate Signed APK… . now click on “Generate Signed APK”.
Step 2
Click Create new.
Step 3
Fill the details and click ok.
jks key details,It will go back to previous window.
Click Next, and give the password which you stored in key.
Step 4
Now click Finish and wait to complete the building process.
Now apk generated successfully. Click show in Explorer.
If you need more details please visit and check the live demo http://javaant.com/how-to-make-apk-file-in-android-studio/#.VwzedZN96Hs
AndroidStudio 3.4
After Grade Build Running
complete, you will see the notification at bottom-right corner like.
Click on locate
and you will see your debuggable APK
For unsigned APK: Simply set signingConfig null. It will give you appName-debug-unsigned.apk
debug {
signingConfig null
}
And build from Build menu. Enjoy
For signed APK:
signingConfigs {
def keyProps = new Properties()
keyProps.load(rootProject.file('keystore.properties').newDataInputStream())
internal {
storeFile file(keyProps.getProperty('CERTIFICATE_PATH'))
storePassword keyProps.getProperty('STORE_PASSWORD')
keyAlias keyProps.getProperty('KEY_ALIAS')
keyPassword keyProps.getProperty('KEY_PASSWORD')
}
}
buildTypes {
debug {
signingConfig signingConfigs.internal
minifyEnabled false
}
release {
signingConfig signingConfigs.internal
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
keystore.properties file
CERTIFICATE_PATH=./../keystore.jks
STORE_PASSWORD=password
KEY_PASSWORD=password
KEY_ALIAS=key0
just go to BUILD->Build APK and it's done
I solve it!
First off all, you should add these:
defaultConfig {
multiDexEnabled true
}
dependencies {
implementation 'com.android.support:multidex:1.0.3'
}
After, you should click Build in top bar of Android Studio:
Build > Build Bundle(s) / APK(s) > Build APK(s)
Finally, you have an app-debug.apk file in:
app > build > outputs > apk > debug > app-debug.apk
Note: apk, debug, app-debug.apk files created automatically in outputs file by Android Studio.