aliyun / aliyun-oss-react-native

MIT License
148 stars 101 forks source link

./gradlew assembleRelease 失败 #49

Open qinAI opened 5 years ago

qinAI commented 5 years ago

FAILURE: Build failed with an exception.

BUILD FAILED in 5s

qinAI commented 5 years ago

Android : xmlns:tools="http://schemas.android.com/tools">

    tools:replace="android:allowBackup"
    android:allowBackup="true"
qinAI commented 5 years ago

这里只需要将android:allowBackup="true" 就可以了

qinAI commented 5 years ago

如果还是不行将 aliyun-oss-react-native build.gradle 修改

android { compileSdkVersion 26 buildToolsVersion '27.0.3'

defaultConfig {
    minSdkVersion 16
    targetSdkVersion 26
    versionCode 1
    versionName "1.0"
}
lintOptions {
    abortOnError false
}

}

Pzz0912 commented 5 years ago

Task :aliyun-oss-react-native:verifyReleaseResources FAILED

FAILURE: Build failed with an exception.

我也一样但是使用你的方法我还是会报错

qinAI commented 5 years ago

你好 我最后使用的是把安卓编译版本改成和自己相同的,上面的方式只能运行不能打包

比如编译工具27.0.3 目标版本改成和自己工程相同的就能打包了 我的是26 阿里云的是23所以冲突了

---原始邮件--- 发件人: "Pzz0912"notifications@github.com 发送时间: 2019年6月10日(星期一) 下午4:29 收件人: "aliyun/aliyun-oss-react-native"aliyun-oss-react-native@noreply.github.com; 抄送: "Author"author@noreply.github.com;"qinAI"1191871910@qq.com; 主题: Re: [aliyun/aliyun-oss-react-native] ./gradlew assembleRelease 失败 (#49)

Task :aliyun-oss-react-native:verifyReleaseResources FAILED

FAILURE: Build failed with an exception.

What went wrong: Execution failed for task ':aliyun-oss-react-native:verifyReleaseResources'.

java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed error: resource android:style/TextAppearance.Material.Widget.Button.Borderless.Colored not found. error: resource android:style/TextAppearance.Material.Widget.Button.Colored not found.

我也一样但是使用你的方法我还是会报错

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

qinAI commented 5 years ago

Material.Widget.Button.Colored not found. 这个同样是SDK版本的问题需要和自己工程保持一致

mokai commented 4 years ago

建议优先使用 rootProject.compileSdkVersion、rootProject.buildToolsVersion、rootProject.targetSdkVersion


buildscript {
    repositories {
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:1.3.1'
    }
}

apply plugin: 'com.android.library'

def DEFAULT_COMPILE_SDK_VERSION = 23
def DEFAULT_BUILD_TOOLS_VERSION = "27.0.3"
def DEFAULT_TARGET_SDK_VERSION = 22

android {
    compileSdkVersion rootProject.hasProperty('compileSdkVersion') ? rootProject.compileSdkVersion : DEFAULT_COMPILE_SDK_VERSION
    buildToolsVersion rootProject.hasProperty('buildToolsVersion') ? rootProject.buildToolsVersion : DEFAULT_BUILD_TOOLS_VERSION

    defaultConfig {
        minSdkVersion 16
        targetSdkVersion rootProject.hasProperty('targetSdkVersion') ? rootProject.targetSdkVersion : DEFAULT_TARGET_SDK_VERSION
        versionCode 1
        versionName "1.0"
    }
    lintOptions {
        abortOnError false
    }
}

repositories {
    mavenCentral()
}

dependencies {
    implementation 'com.facebook.react:react-native:+'
    implementation 'com.aliyun.dpa:oss-android-sdk:+'
}