tolu360/react-native-paystack

Task :react-native-paystack:verifyReleaseResources FAILED

neyosoft opened this issue · 3 comments

VERSION

React Native: 0.64.0
Paystack vaersion: ^3.4.0
Android gradle: 4.1.0

WHAT DID I DO

Install paystack using yarn
complete setting on iOS and it works fine
Did nothing on android because of autolinking and it throws error

App is working fine in debug mode. But when I tried to generate the release APK, I got this error

> Task :react-native-paystack:verifyReleaseResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':react-native-paystack:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > 1 exception was raised by workers:
     com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
     /Users/emmanuelo/.gradle/caches/transforms-2/files-2.1/011ba8390fe30cac28c32e6cd59de93d/jetified-pinpad-1.0.1/res/values/values.xml:7:5-161: AAPT: error: resource attr/foreground (aka com.arttitude360.reactnative.rnpaystack:attr/foreground) not found.
         
     /Users/emmanuelo/.gradle/caches/transforms-2/files-2.1/011ba8390fe30cac28c32e6cd59de93d/jetified-pinpad-1.0.1/res/values/values.xml:7:5-161: AAPT: error: resource attr/foregroundInsidePadding (aka com.arttitude360.reactnative.rnpaystack:attr/foregroundInsidePadding) not found.
         
     /Users/emmanuelo/.gradle/caches/transforms-2/files-2.1/011ba8390fe30cac28c32e6cd59de93d/jetified-pinpad-1.0.1/res/values/values.xml:7:5-161: AAPT: error: resource attr/foregroundGravity (aka com.arttitude360.reactnative.rnpaystack:attr/foregroundGravity) not found.

I initially got the error in debug mode but I added this file to fixed it

<declare-styleable name="ForegroundView">
    <attr name="foreground" format="color" />
    <attr name="foregroundGravity" format="integer" />
    <attr name="foregroundInsidePadding" format="boolean" />
</declare-styleable>

But the issue still happening when generating release APK

where did you add the file?

@neyosoft Pls have you been able to resolve it while generating the release APK?