What went wrong:
A problem occurred configuring project ':react-native-safe-area-context'.
Could not resolve all artifacts for configuration ':react-native-safe-area-context:classpath'.
Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10.
Required by:
project :react-native-safe-area-context
Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10.
Could not get resource 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.6.10/kotlin-gradle-plugin-1.6.10.pom'.
org.apache.http.ssl.SSLInitializationException: E:lib\security\cacerts (ϵͳ�Ҳ���ָ����·����)
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
What went wrong:
A problem occurred configuring project ':react-native-safe-area-context'.
Could not resolve all artifacts for configuration ':react-native-safe-area-context:classpath'.
Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10.
Required by:
project :react-native-safe-area-context
Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10.
Could not get resource 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-gradle-plugin/1.6.10/kotlin-gradle-plugin-1.6.10.pom'.
org.apache.http.ssl.SSLInitializationException: E:lib\security\cacerts (ϵͳ�Ҳ���ָ����·����)
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
at makeError (E:\react native\test2\node_modules\execa\index.js:174:9)
at E:\react native\test2\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (E:\react native\test2\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (E:\react native\test2\node_modules\@react-native-community\cli\build\index.js:192:9)
info Run CLI with --verbose flag for more details.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
没有环境,什么鬼
npx react-native info
System:
OS: Windows 10 10.0.22000
CPU: (8) x64 Intel(R) Core(TM) i5-8300H CPU @ 2.30GHz
Memory: 2.31 GB / 7.87 GB
Binaries:
Node: 16.13.1 - E:\node\node.EXE
Yarn: 1.22.18 - E:\node\node_global\yarn.CMD
npm: 8.5.1 - E:\node\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK: Not Found
IDEs:
Android Studio: Not Found
Visual Studio: Not Found
Languages:
Java: 11.0.14 - C:\Program Files\Common Files\Oracle\Java\javapath\javac.EXE
npmPackages:
@react-native-community/cli: Not Found
react: 17.0.2 => 17.0.2
react-native: 0.67.4 => 0.67.4
react-native-windows: Not Found
npmGlobalPackages:
react-native: Not Found
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.2/userguide/command_line_interface.html#sec:command_line_warnings
FAILURE: Build failed with an exception.
What went wrong: A problem occurred configuring project ':react-native-safe-area-context'.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 7s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
What went wrong: A problem occurred configuring project ':react-native-safe-area-context'.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 7s
info Run CLI with --verbose flag for more details. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
没有环境,什么鬼
npx react-native info
System: OS: Windows 10 10.0.22000 CPU: (8) x64 Intel(R) Core(TM) i5-8300H CPU @ 2.30GHz Memory: 2.31 GB / 7.87 GB Binaries: Node: 16.13.1 - E:\node\node.EXE Yarn: 1.22.18 - E:\node\node_global\yarn.CMD npm: 8.5.1 - E:\node\npm.CMD Watchman: Not Found SDKs: Android SDK: Not Found Windows SDK: Not Found IDEs: Android Studio: Not Found Visual Studio: Not Found Languages: Java: 11.0.14 - C:\Program Files\Common Files\Oracle\Java\javapath\javac.EXE npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.67.4 => 0.67.4 react-native-windows: Not Found npmGlobalPackages: react-native: Not Found
adb devices
List of devices attached a1cf97277d28 device
echo
C:\Users\12196\AppData\Local\Android\Sdk
通过上面的三个指令确定环境是没有问题的,头大!!!