简体   繁体   English

构建签名APK时出错

[英]error while building signed APK

I can run or build APK of my project but when I'm trying to build a signed APK , I get these errors ; 我可以运行或构建项目的APK,但是当我尝试构建签名的APK时,出现这些错误;

I can run or build APK of my project but when I'm trying to build a signed APK , I get these errors ; 我可以运行或构建项目的APK,但是当我尝试构建签名的APK时,出现这些错误;

I can run or build APK of my project but when I'm trying to build a signed APK , I get these errors ; 我可以运行或构建项目的APK,但是当我尝试构建签名的APK时,出现这些错误;

I can run or build APK of my project but when I'm trying to build a signed APK , I get these errors ; 我可以运行或构建项目的APK,但是当我尝试构建签名的APK时,出现这些错误;

I can run or build APK of my project but when I'm trying to build a signed APK , I get these errors ; 我可以运行或构建项目的APK,但是当我尝试构建签名的APK时,出现这些错误;

I can run or build APK of my project but when I'm trying to build a signed APK , I get these errors ; 我可以运行或构建项目的APK,但是当我尝试构建签名的APK时,出现这些错误;

I can run or build APK of my project but when I'm trying to build a signed APK , I get these errors ; 我可以运行或构建项目的APK,但是当我尝试构建签名的APK时,出现这些错误;

I can run or build APK of my project but when I'm trying to build a signed APK , I get these errors ; 我可以运行或构建项目的APK,但是当我尝试构建签名的APK时,出现这些错误;

screenshot of my errors 我的错误的屏幕截图

I downloaded the files and replaced them with the difalt ones but didn't change anything ; 我下载了这些文件并用普通文件替换了,但没有改变任何东西;

here is me build.gradle : 这是我build.gradle:

apply plugin: 'com.android.application'


buildscript {
    repositories {
        mavenCentral()
        jcenter()
        maven {
            url "https://maven.google.com"
        }
    }
}









repositories {
    flatDir {
        dirs 'C:\\Users\\T\\Desktop\\abbyy-rtr-sdk-1.0.8.26.Android_2\\libs\\'
    }
}

android {
    compileSdkVersion 24
    buildToolsVersion '27.0.3'

    defaultConfig {
        applicationId "com.abbyy.rtr.sample.datacapture"
        minSdkVersion 19
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    sourceSets {
        main {
            // In your application you might want to copy all files in the standard assets folder
            assets.srcDirs += ['../../assets', '../../License', "../../scenarios-datacapture/assets"]
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile(name: 'abbyy-rtr-sdk-1.0', ext: 'aar')
    //noinspection GradleCompatible
    compile 'com.android.support:appcompat-v7:24.2.1'
    compile 'com.android.support:support-v4:24.2.1'

//    classpath 'com.android.tools.build:gradle:2.2.0-beta1'

//پوشه
    dependencies {
        compile 'co.ronash.android:pushe-base:1.4.0'
        compile 'com.google.android.gms:play-services-gcm:11.8.0'
        compile 'com.google.android.gms:play-services-location:11.8.0'
    }

// پوشه
}


allprojects {
    repositories {
        mavenCentral();
        jcenter()
    }
}

Try to fixed it by adding: 尝试通过添加以下内容来修复它:

lintOptions { lintOptions {

checkReleaseBuilds false checkReleaseBuilds为假

} }

in build.gradle. 在build.gradle中。

Now clean and build & installRelease works. 现在,清理并构建和安装发布作品。

Add mavenCentral(); 添加mavenCentral(); inside build.gradle ( App level ) 内部build.gradle( 应用程序级别

allprojects {
repositories {
    mavenCentral();
    jcenter()
}
}

and this buildscript code below apply plugin: 'com.android.application' 并在下面的此buildscript代码apply plugin: 'com.android.application'

buildscript {
repositories {
    mavenCentral()
    jcenter()
    maven {
        url "https://maven.google.com"
    }
}
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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