lateinit property _buildFeatureValues has not been initialized
See original GitHub issueDescription
Getting lateinit property _buildFeatureValues has not been initialized
when trying to build on android.
Version
0.70.6
Output of npx react-native info
System: OS: macOS 11.3.1 CPU: (12) x64 Intel® Core™ i7-8850H CPU @ 2.60GHz Memory: 89.78 MB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 14.18.0 - /usr/local/bin/node Yarn: 1.22.19 - npm: 8.19.1 - /usr/local/bin/npm Watchman: 2022.09.19.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.3 - SDKs: iOS SDK: Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3 Android SDK: Not Found IDEs: Android Studio: 2021.3 AI-213.7172.25.2113.9123335 Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild Languages: Java: 11.0.13 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 18.2.0 => 18.2.0 react-native: 0.70.6 => 0.70.6 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found
Steps to reproduce
upgrade RN project from 0.67 to 0.70.xx
Snack, code example, screenshot, or link to a repository
distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists distributionUrl=https://services.gradle.org/distributions/gradle-7.4-all.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists
…
dependencies {
classpath("com.android.tools.build:gradle:7.3.1")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("de.undercouch:gradle-download-task:5.0.1")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.21")
classpath("com.google.gms:google-services:4.3.10")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
Issue Analytics
- State:
- Created 10 months ago
- Comments:6 (3 by maintainers)
The issue you’re having is because you depend on https://github.com/OneSignal/OneSignal-Gradle-Plugin which is deprecated.
You should follow the instructions provided by OneSignal to clean this up and not use the OneSignal Gradle Plugin anymore. Specifically the line:
is creating this build failure for you
Thank you! Removing the old code for the react-native-onesignal inside build.graddle file did fix the issue.