AppsFlyerSDK / appsflyer-react-native-plugin

AppsFlyer plugin for React Native
MIT License
279 stars 199 forks source link

Add namespace to build.gradle so that Gradle can build #561

Open UgurGumushan opened 3 months ago

UgurGumushan commented 3 months ago

Resolves:

> Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl.
   > Namespace not specified. Specify a namespace in the module's build file: /Users/ugurgumushan/code/kontist/app/node_modules/react-native-appsflyer/android/build.gradle. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace.

Gradle 8.7 Android Gradle plugin 8.5 Kotlin 2.0.0

Today I used patch-package to patch react-native-appsflyer@6.14.3 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-native-appsflyer/android/build.gradle b/node_modules/react-native-appsflyer/android/build.gradle
index 7d44b32..eaae633 100755
--- a/node_modules/react-native-appsflyer/android/build.gradle
+++ b/node_modules/react-native-appsflyer/android/build.gradle
@@ -20,6 +20,7 @@ buildscript {
 apply plugin: 'com.android.library'

 android {
+    namespace "com.appsflyer.reactnative"
     compileSdkVersion safeExtGet('compileSdkVersion', 28)
     buildToolsVersion safeExtGet('buildToolsVersion', '29.0.2')

This issue body was partially generated by patch-package.

github-actions[bot] commented 3 months ago

👋 Hi @UgurGumushan and Thank you for reaching out to us. In order for us to provide optimal support, please submit a ticket to our support team at support@appsflyer.com. When submitting the ticket, please specify:

sierrakn commented 2 months ago

We're also running into this now that we need to use Gradle 8