Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RN 0.61.1 android 编译release错误 #4

Open
bashen1 opened this issue Oct 8, 2019 · 0 comments
Open

RN 0.61.1 android 编译release错误 #4

bashen1 opened this issue Oct 8, 2019 · 0 comments

Comments

@bashen1
Copy link

bashen1 commented Oct 8, 2019

com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed

能否改下模块的bulid.gradle

buildscript {
    repositories {
        jcenter()
    }

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

apply plugin: 'com.android.library'

def safeExtGet(prop, fallback) {
    rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
}

android {
    compileSdkVersion safeExtGet("compileSdkVersion", 25)
    buildToolsVersion safeExtGet("buildToolsVersion", '25.0.2')
    defaultConfig {
        minSdkVersion safeExtGet('minSdkVersion', 16)
        targetSdkVersion safeExtGet('targetSdkVersion', 25)
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    api fileTree(dir: 'libs', include: ['*.jar'])
    api 'androidx.appcompat:appcompat:1.0.0'
    api 'com.facebook.react:react-native:+'
    api 'com.aliyun.openservices:aliyun-log-android-sdk:0.4.0'
    api 'com.alibaba:fastjson:1.1.71.android'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
        exclude group: 'androidx.annotation', module: 'annotation'
    })
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant