Skip to content

Android app can't build with React native version 82.1 #1387

@MursiDirect

Description

@MursiDirect

Current Behavior

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/direct/Desktop/Direct/rn-app/node_modules/@amplitude/analytics-react-native/android/build.gradle' line: 21

* What went wrong:
A problem occurred evaluating project ':amplitude_analytics-react-native'.
> Failed to apply plugin 'com.android.internal.library'.
   > Gradle#projectsEvaluated(Action) on build 'Direct' cannot be executed in the current context.

Possible Solution

Adding the correct AGP version in Amplitude build.gradle may help

Steps to Reproduce

Just run this command in the terminal or try to run the android app

cd android  
./gradlew clean 

The iOS app is working fine

Environment

  • React native version: "0.82.1",
  • Amplitude version: @amplitude/analytics-react-native : "^1.5.16" and @amplitude/plugin-session-replay-react-native : "^0.4.3",
  • Gradle version: "9.2.0",
  • distribution URL: https://services.gradle.org/distributions/gradle-9.0.0-bin.zip,
  • AGP : "8.6.1",
  • kotlinVersion : "2.1.20",
  • buildToolsVersion : "36.0.0",
  • ndkVersion = "27.1.12297006"
  • Installation Method: yarn

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions