Android Studio无法生成签名的APK [英] Android studio not generate signed apk

查看:570
本文介绍了Android Studio无法生成签名的APK的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我将正在使用的android studio IDE更新为Android Studio 1.5.1.但是现在我遇到了一些麻烦,因为更新后没有生成签名的apk文件.但是当我插入设备并运行该应用程序时,它可以正常运行.当我使用

recently I updated my working android studio IDE into Android Studio 1.5.1. but now I'm facing some trouble as after updating it did not generating signed apk file. but when I plug a device and run the app, it runs properly. when I use

构建->生成签名的APK

Build -> Generate Signed Apk

它在事件日志中显示

10:38:51 AM Executing tasks: [:app:assembleRelease]

,滑块显示一段时间,然后消失.它也不会显示生成生成完成对话框.然后我更改构建变体并尝试使用连接的设备运行该应用程序.并在事件日志中播种

and the slider shows some time and it disappear. It does not show build generation completion dialog too. then I change build variant and try to run the app using a connected device. and in the Event Log it sows

10:43:32 AM Executing tasks: [:app:assembleDebug]

几秒钟后,出现一个弹出式com消息,说成功生成了apk,但是在relavent文件夹中仍然没有签名的apk.并且该应用可以在设备中正常运行.我的完整事件日志如下.

after few seconds a pop up coms saying Apk(s) generated successfully, but still the signed apk is not there at the relavent folder. and the app runs in the device properly. and my full Event Log is as follow.

10:38:51 AM Executing tasks: [:app:assembleRelease]
10:43:32 AM Executing tasks: [:app:assembleDebug]
10:43:46 AM Gradle build finished in 13s 964ms
10:43:46 AM Generate Signed APK
            APK(s) generated successfully.
            Reveal in Finder
10:43:46 AM Generate Signed APK
            APK(s) generated successfully.
            Reveal in Finder
10:43:46 AM Generate Signed APK
            APK(s) generated successfully.
            Reveal in Finder
10:43:46 AM Generate Signed APK
            APK(s) generated successfully.
            Reveal in Finder
10:43:47 AM Generate Signed APK
            APK(s) generated successfully.
            Reveal in Finder
10:43:47 AM Generate Signed APK
            APK(s) generated successfully.
            Reveal in Finder
10:43:47 AM Generate Signed APK
            APK(s) generated successfully.
            Reveal in Finder
10:43:52 AM Session 'app': Launched on samsung-sm_t211-4100cede9628b000

我的build.gradel文件也如下.

also my build.gradel file is as following.

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion '23.0.0 rc3'
    defaultConfig {
        applicationId "com.lf"
        minSdkVersion 14
        targetSdkVersion 19
        versionCode 63
        versionName '2.0.9'
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
    productFlavors {
    }
}

dependencies {
    compile 'com.android.support:support-v4:22.2.1'
    compile project(':holoColorPickermaster')
    compile project(':qRCodeReaderViewlib')
    compile project(':volley')
    compile project(':library')
}

那么我该如何解决.发生这种情况后,我将完全更新Android Studio,并且仍然保持不变.

so how can I fix this. I fully update Android studio after this was happen and it still the same.

推荐答案

我通过完全删除 Android Studio及其相关文件并重新安装来解决此问题.现在它可以完美地工作了.我在IDE中使用的插件可能存在一些问题.因此,在我的 mac 中,我使用了以下终端命令来删除android studio

I fixed this issue by completely removing Android studio and it's related files and re install it. and now its working perfectly. it may be some issue with the plugins I'm using with the IDE. So in my mac I used following terminal commands to remove android studio

rm -Rf /Applications/Android\ Studio.app
rm -Rf ~/Library/Preferences/AndroidStudio*
rm ~/Library/Preferences/com.google.android.studio.plist
rm -Rf ~/Library/Application\ Support/AndroidStudio*
rm -Rf ~/Library/Logs/AndroidStudio*
rm -Rf ~/Library/Caches/AndroidStudio*
rm -Rf ~/.gradle
rm -Rf ~/.android

然后我重新安装 IDE 并安装必要的 SDK .这个固定的问题对我来说.

then I re install the IDE and install necessary SDKs. this fixed issue for me.

这篇关于Android Studio无法生成签名的APK的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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