简体   繁体   中英

Option to "build signed apk" missing

After updating my Android Studio to the latest version, I can no longer find the option to build signed apk.

显示当前可用选项的图像

I have tried installing beta and canary builds of Android Studio but they do not seem to carry the option either. Can someone help me figure out how to generate signed apks?

I solved this issue by deleting and re-downloading Android SDK Build-Tools . Posting this here in case anyone else is facing this issue.

I've tried re-installing Android SDK Build Tools but that didn't work for me. But I managed to see the option by ensuring that the project is opened in the Android directory instead of the project root.

快速修复是转到文件-> 项目结构-> 构建变体,在构建类型中选择您想要调试或发布的构建,向下滚动并添加一个键到清单占位符应用更改并单击确定,我希望您能找到生成正在构建的签名包/APK 选项,我不知道这是否是正确的方法,这是一个粗略的猜测。

Try Invalidate restart Goto File > Invalidate Caches/Restart If you still face the problem then you have to reinstall the android studio not the build. Delete the android studio folder from users or where you have given the path while installing.then open the android studio and it will automatically start installing

Following solution worked for me. After lot of research, I found this reference. https://developer.android.com/studio/releases/build-tools . Here as mentioned, we need to specify android build tool version in app\\build.gradle file.

android {
    buildToolsVersion "29.0.2"
}

I initially had problem with node on my project so I added this on terminal:

sudo ln -s "$(which node)" /usr/local/bin/node

Then on File > Sync Project with Gradle File System .

After this it showed on the Build menu.

Maybe, after this you can also do: File > Invalidate Chaches / Restart... .

在我的情况下,问题出在 build.gradle 中,请验证您是否已指定:

apply plugin: 'com.android.application'

您必须连接一个测试设备或创建一个新的虚拟设备(如果您实际上还没有)。

My problem was also around the Android SDK Build-Tools , but the reinstall was not solving the issue. I had to look at the logfile and find out, that I was using a platform version which wasn't installed. When I selected the particular verision in the SDK installer, everything started working again.

Just open your project in Android Studio and click where shown below. After that, the option will become available.

在此处输入图像描述

I had the same problem, open your project directly on android folder在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM