appsflyer-react-native-plugin icon indicating copy to clipboard operation
appsflyer-react-native-plugin copied to clipboard

Add namespace to build.gradle so that Gradle can build

Open UgurGumushan opened this issue 1 year ago β€’ 2 comments

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 [email protected] 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.

UgurGumushan avatar Jun 21 '24 14:06 UgurGumushan

πŸ‘‹ 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 [email protected]. When submitting the ticket, please specify:

  • βœ… your AppsFlyer sign-up (account) email
  • βœ… app ID
  • βœ… production steps
  • βœ… logs
  • βœ… code snippets
  • βœ… and any additional relevant information.

github-actions[bot] avatar Jun 26 '24 12:06 github-actions[bot]

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

sierrakn avatar Jul 18 '24 19:07 sierrakn

Fixed in v6.16.2.

al-af avatar Mar 19 '25 12:03 al-af