项目无法跑起来,Java11,node16,android虚机无法自动打开,gradle报错
来源:2-3 创建项目

慕妹2075046
2022-12-14
F:\LILY\project\react-project\demo>npx react-native run-android
info Starting JS server…
- daemon not running; starting now at tcp:5037
- daemon started successfully
info Launching emulator…
error Failed to launch emulator. Reason: Emulator exited before boot…
warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.
info Installing the app…
Starting a Gradle Daemon, 2 incompatible and 1 stopped Daemons could not be reused, use --status for details
Task :react-native-gradle-plugin:compileKotlin
w: F:\LILY\project\react-project\demo\node_modules\react-native-gradle-plugin\src\main\kotlin\com\facebook\react\ReactExtension.kt: (10, 37): ‘BaseVariant’ is deprecated. Deprecated in Java
w: F:\LILY\project\react-project\demo\node_modules\react-native-gradle-plugin\src\main\kotlin\com\facebook\react\ReactExtension.kt: (119, 30): ‘BaseVariant’ is deprecated. Deprecated in Java
w: F:\LILY\project\react-project\demo\node_modules\react-native-gradle-plugin\src\main\kotlin\com\facebook\react\ReactExtension.kt: (135, 26): ‘BaseVariant’ is deprecated. Deprecated in Java
w: F:\LILY\project\react-project\demo\node_modules\react-native-gradle-plugin\src\main\kotlin\com\facebook\react\ReactExtension.kt: (157, 32): ‘BaseVariant’ is deprecated. Deprecated in Java
w: F:\LILY\project\react-project\demo\node_modules\react-native-gradle-plugin\src\main\kotlin\com\facebook\react\ReactExtension.kt: (163, 31): ‘BaseVariant’ is deprecated. Deprecated in Java
w: F:\LILY\project\react-project\demo\node_modules\react-native-gradle-plugin\src\main\kotlin\com\facebook\react\ReactExtension.kt: (171, 36): ‘BaseVariant’ is deprecated. Deprecated in Java
w: F:\LILY\project\react-project\demo\node_modules\react-native-gradle-plugin\src\main\kotlin\com\facebook\react\ReactPlugin.kt: (114, 48): ‘reactRoot: DirectoryProperty’ is deprecated. reactRoot was confusing and has been replace with root to point to your root project and reactNativeDir to point to the folder of the react-native NPM package
w: F:\LILY\project\react-project\demo\node_modules\react-native-gradle-plugin\src\main\kotlin\com\facebook\react\TaskConfiguration.kt: (10, 37): ‘ApplicationVariant’ is deprecated. Deprecated in Java
w: F:\LILY\project\react-project\demo\node_modules\react-native-gradle-plugin\src\main\kotlin\com\facebook\react\TaskConfiguration.kt: (11, 37): ‘BaseVariant’ is deprecated. Deprecated in Java
w: F:\LILY\project\react-project\demo\node_modules\react-native-gradle-plugin\src\main\kotlin\com\facebook\react\TaskConfiguration.kt: (12, 37): ‘LibraryVariant’ is deprecated. Deprecated in Java
w: F:\LILY\project\react-project\demo\node_modules\react-native-gradle-plugin\src\main\kotlin\com\facebook\react\TaskConfiguration.kt: (27, 51): ‘BaseVariant’ is deprecated. Deprecated in Java
w: F:\LILY\project\react-project\demo\node_modules\react-native-gradle-plugin\src\main\kotlin\com\facebook\react\TaskConfiguration.kt: (130, 12): ‘ApplicationVariant’ is deprecated. Deprecated in Java
w: F:\LILY\project\react-project\demo\node_modules\react-native-gradle-plugin\src\main\kotlin\com\facebook\react\TaskConfiguration.kt: (131, 12): ‘LibraryVariant’ is deprecated. Deprecated in Java
w: F:\LILY\project\react-project\demo\node_modules\react-native-gradle-plugin\src\main\kotlin\com\facebook\react\TaskConfiguration.kt: (251, 14): ‘BaseVariant’ is deprecated. Deprecated in Java
Task :app:compileDebugJavaWithJavac
Task :app:stripDebugDebugSymbols
Unable to strip the following libraries, packaging them as they are: libc++_shared.so, libevent-2.1.so, libevent_core-2.1.so, libevent_extra-2.1.so, libfabricjni.so, libfb.so, libfbjni.so, libflipper.so, libfolly_runtime.so, libglog.so, libglog_init.so, libhermes-executor-debug.so, libhermes.so, libimagepipeline.so, libjsi.so, libjsijniprofiler.so, libjsinspector.so, liblogger.so, libmapbufferjni.so, libnative-filters.so, libnative-imagetranscoder.so, libreact_codegen_rncore.so, libreact_config.so, libreact_debug.so, libreact_nativemodule_core.so, libreact_render_animations.so, libreact_render_attributedstring.so, libreact_render_componentregistry.so, libreact_render_core.so, libreact_render_debug.so, libreact_render_graphics.so, libreact_render_imagemanager.so, libreact_render_leakchecker.so, libreact_render_mapbuffer.so, libreact_render_mounting.so, libreact_render_runtimescheduler.so, libreact_render_scheduler.so, libreact_render_telemetry.so, libreact_render_templateprocessor.so, libreact_render_textlayoutmanager.so, libreact_render_uimanager.so, libreact_utils.so, libreactnativeblob.so, libreactnativejni.so, libreactperfloggerjni.so, librrc_image.so, librrc_root.so, librrc_scrollview.so, librrc_text.so, librrc_textinput.so, librrc_unimplementedview.so, librrc_view.so, libruntimeexecutor.so, libturbomodulejsijni.so, libyoga.so.
Task :app:installDebug FAILED
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.5.1/userguide/command_line_interface.html#sec:command_line_warnings
38 actionable tasks: 38 executed
ע: F:\LILY\project\react-project\demo\android\app\src\debug\java\com\demo\ReactNativeFlipper.javaʹ�û����ѹ�ʱ��
API��
ע: �й���ϸ��Ϣ, ��ʹ�� -Xlint:deprecation ���±��롣
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:app:installDebug’.
com.android.builder.testing.api.DeviceException: No connected devices!
- 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 32s
error Failed to install the app. Make sure you have an Android emulator running or a device connected.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
ע: F:\LILY\project\react-project\demo\android\app\src\debug\java\com\demo\ReactNativeFlipper.javaʹ�û����ѹ�ʱ��
API��
ע: �й���ϸ��Ϣ, ��ʹ�� -Xlint:deprecation ���±��롣
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:app:installDebug’.
com.android.builder.testing.api.DeviceException: No connected devices!
- 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 32s
at makeError (F:\LILY\project\react-project\demo\node_modules\execa\index.js:174:9)
at F:\LILY\project\react-project\demo\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (F:\LILY\project\react-project\demo\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (F:\LILY\project\react-project\demo\node_modules\@react-native-community\cli\build\index.js:142:9)
info Run CLI with --verbose flag for more details.
1回答
-
今朝
2025-01-17
你用的虚拟机是什么,android自带的吗,确定创建虚拟机了没,试试真机可以启动吗
00
相似问题