更新Android Studio 3.1.1后,“定位”链接不会打开生成的APK文件夹 [英] After Android Studio 3.1.1 update, the 'locate' link does not open generated APK folder

查看:310
本文介绍了更新Android Studio 3.1.1后,“定位”链接不会打开生成的APK文件夹的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新:问题出在Android 3.1.1更新之后。

APK生成过程完成后,Android Studio(Windows OS)提出一个弹出窗口来定位或分析APK。

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.

更新

在APK中生成对话框我指定目标路径,即我PC上的文件夹:

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

在某些项目中,我使用大量的gradle行重命名APK:

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)
        }
    }
}

我看到APK已重命名并放置在预期的文件夹中,locate链接是唯一无法使用的数据。

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.

对我来说,这似乎是 Android Studio 中的错误。

This to me looks like a bug in Android Studio.

在您的情况下,如果您看到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

这意味着您在 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. 首先创建一个名为发布 COMPILED_APK 文件夹中。

生成apk。

现在,当您单击定位时,它将打开发布文件夹,但文件夹中什么也没有。

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

到找到您的apk,您必须导航到 T:\COMPILED_APK\e\release

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

这很奇怪,但这是这样的。

This is weird, but this is how it works.

这篇关于更新Android Studio 3.1.1后,“定位”链接不会打开生成的APK文件夹的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆