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.
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:
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.
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:
First create a folder called release inside COMPILED_APK folder.
Generate the apk.
Now when you click on locate, it will open up the release folder but nothing will be inside the folder.
To find your apk you have to navigate to
T:\COMPILED_APK\e\release
This is weird, but this is how it works.
来源:https://stackoverflow.com/questions/49923569/after-android-studio-3-1-1-update-the-locate-link-does-not-open-generated-apk