任务' installRelease'在根项目中找不到

时间:2018-05-25 10:36:27

标签: android android-studio gradle task

好的,我有标题中描述的问题。这是我的gradle文件

   apply plugin: 'com.android.application'

        android {
            compileSdkVersion 27

            signingConfigs {
                debug {
                    keyAlias 'alias'
                    keyPassword 'larissa'
                    storeFile file('capstoneproject.jks')
                    storePassword 'larissa81'
                }
            }

            defaultConfig {
                applicationId "theo.tziomakas.news"
                minSdkVersion 21
                targetSdkVersion 27
                versionCode 1
                versionName "1.0"
                testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
            }
            buildTypes {
                release {
                    minifyEnabled false
                    proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
                }
            }
            buildToolsVersion '27.0.3'
        }

        dependencies {
            implementation fileTree(include: ['*.jar'], dir: 'libs')
            implementation 'com.android.support:appcompat-v7:27.0.2'
            implementation 'com.android.support:support-v4:27.0.2'
            implementation 'com.android.support:cardview-v7:27.0.2'
            implementation 'com.android.support:support-v13:27.0.2'
            implementation 'com.android.support:design:27.0.2'
            implementation 'com.android.support.constraint:constraint-layout:1.1.0'
            implementation 'com.google.firebase:firebase-auth:11.8.0'
            implementation 'com.google.firebase:firebase-database:11.8.0'
            testImplementation 'junit:junit:4.12'
            androidTestImplementation 'com.android.support.test:runner:1.0.2'
            androidTestImplementation 'com.android.support.test:rules:1.0.2'
            implementation 'com.android.support:support-annotations:27.1.1'
            androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
            implementation 'com.squareup.picasso:picasso:2.5.2'
            implementation 'com.google.code.gson:gson:2.8.2'
        }

        apply plugin: 'com.google.gms.google-services'

我在app文件夹中有jks文件。当然我也创建了apk文件。

jks file

那么我该如何解决这个错误?

当我运行应用程序时,我收到此错误。

 Keystore file '/Users/theodosiostziomakas/Desktop/capstone/Capstone-Udacity/app/capstoneproject.jks' not found for signing config 'debug'.

谢谢,

西奥。

1 个答案:

答案 0 :(得分:2)

请检查您的密钥库文件是否位于以/Users/theodosiostziomakas/Desktop/capstone/Capstone-Udacity/app/命名的capstoneproject.jks,如果文件位于其他宫殿,则尝试再次生成签名的apk,然后在生成签名的apk对话框中更改密钥库文件的路径选择choose exixting Button并在此处放置.jks文件路径。