Build unsigned APK file with Android Studio

前端 未结 19 2977
抹茶落季
抹茶落季 2020-11-28 00:15

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

相关标签:
19条回答
  • 2020-11-28 01:00

    In Android Studio:

    1. Build

    2. Build APK(s)

    3. Wait and go to the location shown in a pop-up window. On right bottom side

    0 讨论(0)
  • 2020-11-28 01:01

    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

    0 讨论(0)
  • 2020-11-28 01:01

    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

    0 讨论(0)
  • 2020-11-28 01:01

    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
    
    0 讨论(0)
  • 2020-11-28 01:02

    just go to BUILD->Build APK and it's done

    0 讨论(0)
  • 2020-11-28 01:02

    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.

    0 讨论(0)
提交回复
热议问题