bamlab / react-native-braintree-payments-drop-in

React Native integration of Braintree Drop-in
MIT License
35 stars 31 forks source link

Execution failed for task ':react-native-braintree-payments-drop-in:verifyReleaseResources'. #6

Open oliviaserena opened 6 years ago

oliviaserena commented 6 years ago

Hello! So I am just trying to build my app for ios and android. The ios version has been released onto the App Store. However, whenever I run ./gradlew assembleRelease - the build processes for a few minutes before failing.

Some help with this would be hugely appreciated! Thanks.

Minishlink commented 6 years ago

Hello, this is much lilely not related to this repository, but please add android.enableAapt2=false in your gradle.properties

oliviaserena commented 6 years ago

Then I just get an aapt-related error. Thanks so much for your help! New to developing for android and hugely appreciate it.

Minishlink commented 6 years ago

Can you look on these potential solutions https://github.com/evollu/react-native-fcm/issues/800 It seems your project is misconfigured somehow

ivan-kaminskyi commented 5 years ago

I fixed this problem by forking the lib and adding com.android.support:appcompat-v7 to deps in gradle file

UPDATE The other solution was to add

subprojects {
  ext {
    compileSdk = 27
    buildTools = "27.0.3"
    minSdk = 18
    targetSdk = 27
  }

  afterEvaluate { project ->
    if (!project.name.equalsIgnoreCase("app")
      && project.hasProperty("android")) {
      android {
        compileSdkVersion compileSdk
        buildToolsVersion buildTools
        defaultConfig {
          minSdkVersion minSdk
          targetSdkVersion targetSdk
        }
          configurations.all {
              resolutionStrategy {
                  force 'com.android.support:appcompat-v7:27.1.1'
              }
          }
      }
    }
  }
}

to main gradle file