16

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.

Seraphim's
  • 12,559
  • 20
  • 88
  • 129

1 Answers1

7

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.

Scampbell
  • 1,535
  • 14
  • 24
Nongthonbam Tonthoi
  • 12,667
  • 7
  • 37
  • 64
  • The message I see in the Android Studio log files is: "ide.actions.ShowFilePathAction - not a directory: C:\\app\debug". Adding the debug directory fixed it. – Scampbell Jul 08 '18 at 19:49