android - 我在签名时似乎无法构建我的android应用程序

标签 android gradle build.gradle sign

我可以在未签名的情况下构建该应用程序,但是每次尝试签名时,Android Studio都会说出如下内容:

"ERROR: Failed to resolve: com.android.support.cardview-v7:27.1.1"



我检查了this并验证了它的存在,但是它似乎不起作用,如果我尝试修复它,它还会带来其他依赖关系问题。

“我的build.gradle(应用程序)”
apply plugin: 'com.android.application'

android {
    compileSdkVersion 27

    defaultConfig {
        applicationId "uk.org.cetma.llanellistandard"
        minSdkVersion 23
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner 
"android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 
'proguard-rules.pro'
        }
    }
}

repositories {
    mavenCentral() // jcenter() works as well because it pulls from Maven 
Central
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.github.bumptech.glide:glide:3.7.0'
    implementation 'com.android.support:support-v7:27.1.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    implementation 'com.squareup.picasso:picasso:2.71828'
    testImplementation 'junit:junit:4.12'
    //androidTestImplementation 'com.android.support.test:runner:1.0.2'
    //androidTestImplementation 'com.android.support.test.espresso:espresso- 
   core:3.0.2'

    //Add Library
    implementation 'com.android.support.cardview-v7:27.1.1'
    implementation 'com.android.support:recyclerview-27.1.0'
    implementation 'com.google.code.gson:gson:2.8.2'


}

我希望它对应用程序进行签名,以便确保它仍然可以运行。

以下是我得到的错误的示例:

ERROR: Failed to resolve: com.android.support.cardview-v7:27.1.1: Affected Modules: app

最佳答案

卡 View 依赖项中缺少双点,请使用此-

implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'

关于android - 我在签名时似乎无法构建我的android应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56668575/

相关文章:

java - Android Studio 在运行期间显示此错误。错误 : Program type already present: androidx. concurrent.futures.DirectExecutor

android - 我应该使用哪个框架在 Android 上运行 OData API?

android - 在深色和浅色通知状态栏图标之间切换

java - 用Lombok 1.18.12构建的Gradle 6.4不生成getter和setter

gradle - 在 gradle 中为 liquibase 插件设置工作目录?

android - 两个依赖使用相同的库但版本不同

android - 通过xml指定LayoutParams.flag_secure

android - 在eclipse中导入libgdx gradle项目给出错误

android - 将 Android Studio 更新到 3.1.2 后,Gradle 构建失败

grails - Grails 3.0.6 build.gradle错误无法解析配置 ':testRuntime'的所有依赖项