Skip to content

compile error when integrate react native with existing android app  #36246

@mistletoe5215

Description

@mistletoe5215

Description

  • build error
/node_modules/react-native-gradle-plugin/src/main/kotlin/com/facebook/react/tasks/BundleHermesCTask.kt: (138, 11): This declaration is experimental and its usage must be marked with '@kotlin.ExperimentalStdlibApi' or '@OptIn(kotlin.ExperimentalStdlibApi::class)'
  • env
    • agp:7.0.3
    • kotlin:1.6.10
    • react-native:0.71

Version

0.71.3

Output of npx react-native info

System:
OS: macOS 11.4
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 198.67 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 16.13.2 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 8.1.2 - /usr/local/bin/npm
Watchman: Not Found
Managers:
CocoaPods: 1.11.3 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
Android SDK: Not Found
IDEs:
Android Studio: 2021.2 AI-212.5712.43.2112.8609683
Xcode: 12.5/12E262 - /usr/bin/xcodebuild
Languages:
Java: 11.0.14 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: Not Found
react-native: Not Found
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found

Steps to reproduce

intergate rn latest version into pure native app -> sync

  • env
    • agp:7.0.3
    • kotlin:1.6.10
    • react-native:0.71

Snack, code example, screenshot, or link to a repository

buildscript {

dependencies {
    classpath Gradle.agp <---- 7.0.3
    classpath "com.facebook.react:react-native-gradle-plugin"
}

}

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions