добавив ANDROIDHOME в env
добавив пути к ним
Ничего не работает
Код: Выделить всё
"react-native": "0.70.5",
"react-native-actions-sheet": "^0.7.2",
"react-native-chart-kit": "^6.12.0",
"react-native-cli": "^2.0.1",
"@react-native-community/netinfo": "^11.3.2",
Код: Выделить всё
See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings
153 actionable tasks: 147 executed, 6 up-to-date
Warning: This version only understands SDK XML versions up to 3 but an SDK XML file of version 4 was encountered. This can happen if you use versions of Android Studio and the command-line tools that were released at different times.
Note: D:\Projects\ReactNative\Project\node_modules\@react-native-async-storage\async-storage\android\src\main\java\com\reactnativecommunity\asyncstorage\AsyncStorageModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: D:\Projects\ReactNative\Project\node_modules\@react-native-async-storage\async-storage\android\src\main\java\com\reactnativecommunity\asyncstorage\AsyncStoragePackage.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
D:\Projects\ReactNative\Project\node_modules\@react-native-community\netinfo\android\src\main\java\com\reactnativecommunity\netinfo\NetInfoUtils.java:45: error: cannot find symbol
receiver, filter, exported ? Context.RECEIVER_EXPORTED : Context.RECEIVER_NOT_EXPORTED);
^
symbol: variable RECEIVER_EXPORTED
location: class Context
D:\Projects\ReactNative\Project\node_modules\@react-native-community\netinfo\android\src\main\java\com\reactnativecommunity\netinfo\NetInfoUtils.java:45: error: cannot find symbol
receiver, filter, exported ? Context.RECEIVER_EXPORTED : Context.RECEIVER_NOT_EXPORTED);
^
symbol: variable RECEIVER_NOT_EXPORTED
location: class Context
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-community_netinfo:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
Код: Выделить всё
buildscript {
ext {
buildToolsVersion = "31.0.0"
minSdkVersion = 21
compileSdkVersion = 32
targetSdkVersion = 33
kotlinVersion = "1.6.10"
if (System.properties['os.arch'] == "aarch64") {
// For M1 Users we need to use the NDK 24 which added support for aarch64
ndkVersion = "24.0.8215888"
} else {
// Otherwise we default to the side-by-side NDK version from AGP.
ndkVersion = "21.4.7075529"
}
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath ('com.android.tools.build:gradle:2.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:$kotlinVersion" //
Подробнее здесь: [url]https://stackoverflow.com/questions/78759679/task-react-native-community-netinfocompiledebugjavawithjavac-failed[/url]