phuochau / react-native-thumbnail

Get thumbnail from local media. Currently, it only supports for video.
MIT License
135 stars 104 forks source link

Android publishing application failed #42

Open gdoudeng opened 5 years ago

gdoudeng commented 5 years ago

`Execution failed for task ':react-native-thumbnail:verifyReleaseResources'.

java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed G:\Users\ASUS\WebStormProjects\shootingv1\node_modules\react-native-thumbnail\android\build\intermediates\res\merged\release\values-v28\values-v28.xml:7: error: resource android:attr/dialogCornerRadius not found. G:\Users\ASUS\WebStormProjects\shootingv1\node_modules\react-native-thumbnail\android\build\intermediates\res\merged\release\values-v28\values-v28.xml:11: error: resource android:attr/dialogCornerRadius not found. G:\Users\ASUS\WebStormProjects\shootingv1\node_modules\react-native-thumbnail\android\build\intermediates\res\merged\release\values\values.xml:2713: error: resource android:attr/fontVariationSettings not found. G:\Users\ASUS\WebStormProjects\shootingv1\node_modules\react-native-thumbnail\android\build\intermediates\res\merged\release\values\values.xml:2714: error: resource android:attr/ttcIndex not found. error: failed linking references.`

ngocketit commented 5 years ago

You can change the build.gradle in node_modules/react-native-thumbnail to something similar to this as a temporary fix:

buildscript {
    repositories {
        jcenter()
        google()
    }

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

apply plugin: 'com.android.library'

android {
    compileSdkVersion 28
    buildToolsVersion "28.0.3"

    defaultConfig {
        minSdkVersion 24
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
    }
    lintOptions {
        abortOnError false
    }
}

repositories {
    mavenCentral()
    google()
}

dependencies {
    compile 'com.facebook.react:react-native:+'
}
pvroosendaal commented 5 years ago

@gdoudeng Were you able to fix this? Having the same issue here

nikopolidi commented 5 years ago

same issue with react-native@0.59.8

sumudu-dewasurendra commented 5 years ago

Does anyone find a solution for this. Same in 0.59.8

SaulNunez commented 5 years ago

It's a bit on the hack-y side, but this solution to a similar issue in another RN package worked for me.