allboatsrise / expo-marketingcloudsdk

Expo module for Salesforce Marketing Cloud SDK
MIT License
12 stars 12 forks source link

Build error "Could not set unknown property 'debuggableVariants' for extension 'react' of type com.facebook.react.ReactExtension" when using the library #10

Closed jpamarohorta closed 1 year ago

jpamarohorta commented 1 year ago

Hello,

I'm having issues with the Android build process. After installing the library it works well on iOS (after following the fixes mentioned in issue 6 but it's breaking the Android build with the following error:

> Configure project :allboatsrise-expo-marketingcloudsdk
WARNING:Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0. To opt-in to the future behavior, set the Gradle property android.disableAutomaticComponentCreation=true in the `gradle.properties` file or use the new publishing DSL.

> Configure project :app
 ℹ️  Applying gradle plugin 'expo-dev-launcher-gradle-plugin' (expo-dev-launcher@2.2.1)

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* Where:
Build file '/Users/yyyyy/Projects/xxxx-app/android/app/build.gradle' line: 24

* What went wrong:
A problem occurred evaluating project ':app'.
> Could not set unknown property 'debuggableVariants' for extension 'react' of type com.facebook.react.ReactExtension.

2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':app'.
> com.android.builder.errors.EvalIssueException: compileSdkVersion is not specified. Please add it to build.gradle

I've tested without the library and the app builds correctly, so something here conflicts with the app gradle config. I've also posted on a similar issue in the expo repo and they (correctly) pointed me out to the library itself.

For reference I'm using the latest library version 48.0.0 and the latest expo 48.0.17.

Any idea what might be happening? thank you!

andrejpavlovic commented 1 year ago

Are you having these issues when installing in a brand new project, or is this issue occurring in a project with a number of other libraries?

shafterihno commented 1 year ago

I'm facing the exact same issue, anyone have discovered something on how to resolve this problem? thank you!

andrejpavlovic commented 1 year ago

If you can provide a minimal example that reproduces this issue, I could take a look at some point.

jpamarohorta commented 1 year ago

I haven't solved the problem yet but I managed to pinpoint it to the update of Expo to 48 (from 46 in our case). It seems it's not related to this library but more to a change in the latest Expo version.

@shafterihno maybe you can add something to an existing issue in the expo-cli repository?

@andrejpavlovic should I close this issue?

andrejpavlovic commented 1 year ago

Closing as per https://github.com/allboatsrise/expo-marketingcloudsdk/issues/10#issuecomment-1566950052