Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

After Android Studio 3.1.1 update, the 'locate' link does not open generated APK folder

UPDATE: The problem came after Android 3.1.1 update.

After APK generation process is completed, Android Studio (Windows OS) propose a popup to locate or analyze the APK.

enter image description here

Unfortunately if I click on locate, nothing is happening.

UPDATE

In the APK Generetion Dialog I specify the destination path, a folder on my pc:

enter image description here

And in some projects I use a bounche of gradle lines to rename the APK:

android.applicationVariants.all { variant ->
    if (variant.buildType.name == BuilderConstants.RELEASE) {
        variant.outputs.each { output ->
            def padVersionCode = variant.versionCode.toString();
            padVersionCode = padVersionCode.padLeft(5, '0')
            def newApkName = "${output.baseName}_${padVersionCode}-${variant.versionName}"
            newApkName = newApkName + ".apk"
            output.outputFile = new File(output.outputFile.parent, newApkName)
        }
    }
}

I see the APK renamed and place in th expected folder, the locate link is the only dat does not work.

like image 676
Seraphim's Avatar asked Apr 19 '18 14:04

Seraphim's


People also ask

Where is the APK generated in Android Studio?

Android Studio saves the APKs you build in project-name / module-name /build/outputs/apk/ .

How can I create APK file in Android Studio?

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.

Where is the APK?

If you want to locate the APK files in your Android phones, you can find the APK for user-installed apps under /data/app/directory while the preinstalled ones are located in /system/app folder and you can access them by using ES File Explorer.


1 Answers

Unfortunately if I click on locate, nothing is happening.

This to me looks like a bug in Android Studio.

In your case if you see the Android Studio logs (Help->Show Log in Explorer), you will see something like:

INFO - ide.actions.ShowFilePathAction - not a directory: T:\COMPILED_APK\release

which means that you don't have a folder called called release inside COMPILED_APK folder.

So if you really want it this way then:

  1. First create a folder called release inside COMPILED_APK folder.

  2. Generate the apk.

  3. Now when you click on locate, it will open up the release folder but nothing will be inside the folder.

  4. To find your apk you have to navigate to T:\COMPILED_APK\e\release

This is weird, but this is how it works.

like image 98
Nongthonbam Tonthoi Avatar answered Nov 06 '22 05:11

Nongthonbam Tonthoi