Giter VIP home page Giter VIP logo

Comments (7)

Bucimis avatar Bucimis commented on August 23, 2024 2

Hi @vitorreis thanks for reporting - we're aiming to have a solution ready within a day or two

from braze-react-native-sdk.

Bucimis avatar Bucimis commented on August 23, 2024 1

Hi @shaoliangzhong, thanks for the clear instructions - we were able to repro. The issue here is that our RN android module build.gradle specifies a very old version (0.19.+) for its react native dependency. See https://github.com/Appboy/appboy-react-sdk/blob/master/android/build.gradle#L17 for the dependency declaration. The older version of react native built into our module's test APK is conflicting with the more modern version of RN included in the app project.

This doesn't occur when running assembleDebug because assembleDebug pulls in our module's output aar, which don't contain dependencies.

To confirm this on your end, you can run ./gradlew :react-native-appboy-sdk:dependencies (a gradle command to list dependencies for our module) and check the version of com.facebook.react:react-native being pulled in for debug configurations, e.g. _debugAndroidTestCompile.

If you edit the react native dependency in our module to to compile 'com.facebook.react:react-native:+' and clear the build folder, the test APK will be compiled with a modern version of RN and everything will compile successfully.

We'll also make this change in our next release.

from braze-react-native-sdk.

Bucimis avatar Bucimis commented on August 23, 2024

Hi @vitorreis, when you ran react-native run-android, did you specify an Android build variant using --variant=<ProductFlavour><BuildType>?

We followed the repro steps provided to create an appboyBug repro app and were able to get it to run successfully using react-native run-android --variant=devDebug

Note that once you add a flavor, there's no longer a build variant called debug, which is what react-native run-android tries to build by default.

from braze-react-native-sdk.

vitorreis avatar vitorreis commented on August 23, 2024

Hello @Bucimis thanks for having a look on this so quickly.

While double checking here I can confirm that this error only happens if you omit the --variant=devDebug flag.

Closing this

from braze-react-native-sdk.

shaoliangzhong avatar shaoliangzhong commented on August 23, 2024

Hi, I also see this error when building my project for e2e tests. Passing assembleAndroidTest to gradlew will cause the build to fail.

I can also reproduce this in the appboy demo project. Running ./gradlew assembleDebug from the android directory will succeed, but running ./gradlew assembleAndroidTest will fail with the above error.

from braze-react-native-sdk.

Bucimis avatar Bucimis commented on August 23, 2024

Hey @shaoliangzhong,

We weren't able to reproduce build failure running ./gradlew assembleAndroidTest after naively updating to 0.57 and running that command on AppboyProject. Did you make any other modifications to AppboyProject prior to reproducing the issue (e.g. adding a new flavor)?

If you could send us a zipped up sample project that reproduces the issue, that may be the fastest way for us to get on the same page.

from braze-react-native-sdk.

shaoliangzhong avatar shaoliangzhong commented on August 23, 2024

Hi @Bucimis , thanks for the timely reply. I didn't update to 0.57, I simply did the following:

  1. git clone https://github.com/Appboy/appboy-react-sdk.git
  2. cd appboy-react-sdk/AppboyProject
  3. npm install
  4. cd android
  5. ./gradlew assembleDebug (succeeded)
  6. ./gradlew assembleAndroidTest (failed)

UPDATE:

The error was actually different:

com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat;

I only saw the same error as described in this issue when I was building a testing app of my own project.

from braze-react-native-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.