PS:\我的Project\sample> npx反应-本地运行-安卓信息启动JS服务器.“adb”不被识别为内部或外部命令、可操作的程序或批处理文件。信息发射模拟器..。错误未能启动模拟器。原因:没有找到作为emulator -list-avds输出的模拟器。警告:请手动启动模拟器或连接设备。否则,应用程序可能无法启动。安装应用程序的信息。下载...............10%................20%................30%................40%................50%................60%......... https://services.gradle.org/distributions/gradle-7.5.1-all.zip......70%................80%................90%................100%
欢迎来到7.5.1级!
以下是这个版本的亮点:
的持续
有关详细信息,请参阅https://docs.gradle.org/7.5.1/release-notes.html
启动分级守护进程(后续构建将更快)
Project\sample\node_modules\react-native-gradle-plugin\src\main\kotlin\com\facebook\react\ReactExtension.kt:(10,37):'BaseVariant‘被废弃了。在Java : E:\My Project\sample\node_modules\react-native-gradle-plugin\src\main\kotlin\com\facebook\react\ReactExtension.kt:(119,30)中不推荐使用'BaseVariant‘。在Java : E:\My Project\sample\node_modules\react-native-gradle-plugin\src\main\kotlin\com\facebook\react\ReactExtension.kt:(135,26)中不推荐使用'BaseVariant‘。在Java : E:\My Project\sample\node_modules\react-native-gradle-plugin\src\main\kotlin\com\facebook\react\ReactExtension.kt:(157,32)中不推荐使用'BaseVariant‘。在Java : E:\My Project\sample\node_modules\react-native-gradle-plugin\src\main\kotlin\com\facebook\react\ReactExtension.kt:(163,31)中不推荐使用'BaseVariant‘。在Java : E:\My Project\sample\node_modules\react-native-gradle-plugin\src\main\kotlin\com\facebook\react\ReactExtension.kt:(171,36)中不推荐使用'BaseVariant‘。在Java : E:\My Project\sample\node_modules\react-native-gradle-plugin\src\main\kotlin\com\facebook\react\ReactPlugin.kt:(114,48)中不推荐使用'reactRoot: DirectoryProperty‘。Project\sample\node_modules\react-native-gradle-plugin\src\main\kotlin\com\facebook\react\TaskConfiguration.kt:被reactRoot替换为指向您的根项目,reactNativeDir指向react本机NPM包w: E:\My reactNativeDir (10,37):'ApplicationVariant‘。在Java : E:\My Project\sample\node_modules\react-native-gradle-plugin\src\main\kotlin\com\facebook\react\TaskConfiguration.kt:(11,37)中不推荐使用'BaseVariant‘。在Java : E:\My Project\sample\node_modules\react-native-gradle-plugin\src\main\kotlin\com\facebook\react\TaskConfiguration.kt:(12,37)中不推荐使用'LibraryVariant‘。在Java : E:\My Project\sample\node_modules\react-native-gradle-plugin\src\main\kotlin\com\facebook\react\TaskConfiguration.kt:(27,51)中不推荐使用'BaseVariant‘。在Java : E:\My Project\sample\node_modules\react-native-gradle-plugin\src\main\kotlin\com\facebook\react\TaskConfiguration.kt:(130,12)中不推荐使用'ApplicationVariant‘。在Java : E:\My Project\sample\node_modules\react-native-gradle-plugin\src\main\kotlin\com\facebook\react\TaskConfiguration.kt:(131,12)中不推荐使用'LibraryVariant‘。在Java : E:\My Project\sample\node_modules\react-native-gradle-plugin\src\main\kotlin\com\facebook\react\TaskConfiguration.kt:(251,14)中不推荐使用'BaseVariant‘。在Java中被废弃
在此构建中使用了不推荐的Gradle特性,使其与Gradle 8.0不兼容。
您可以使用“--警告-模式所有”来显示个别的弃用警告,并确定它们是否来自您自己的脚本或插件。
参见https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings 5可操作任务:5已执行
失败:生成失败,出现异常。
出错的原因:无法确定任务':app:compileDebugJavaWithJavac'.的依赖关系
找不到
SDK的位置。使用ANDROID_HOME环境变量定义有效的SDK位置,或者在项目的本地属性文件中设置‘E:\ environment \sample\Androidlocal.properties’的sdk.dir路径。
使用--stacktrace选项运行
以获取堆栈跟踪。使用--info或-调试选项运行以获得更多日志输出。用扫描来获得完整的洞察力。
在34m15s中生成失败
安装应用程序失败。确保设置了Android开发环境:https://reactnative.dev/docs/environment-setup。错误:命令失败: gradlew.bat应用程序:installDebug -PreactNativeDevServerPort=8081
失败:生成失败,出现异常。
发布于 2022-09-23 11:01:41
您的android home属性设置不正确,在这里您可以找到如何做-> SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable
https://stackoverflow.com/questions/73826306
复制相似问题