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.
Android Studio saves the APKs you build in project-name / module-name /build/outputs/apk/ .
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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With