react-native启动GitHub_Advanced项目失败

来源:1-2 课程导学

慕斯卡9059199

2022-05-23

xcode Version 13.4 (13F17a)
android studio chipmunk 2021.2.1
jdk1.8
macos12.3.1

npx @react-native-community/cli doctor✓ Node.js
✓ yarn
✓ npm
✓ Watchman - Used for watching changes in the filesystem when in development mode

Android
✓ JDK
✓ Android Studio - Required for building and installing your app on Android
✓ Android SDK - Required for building and installing your app on Android
✓ ANDROID_HOME

iOS
✓ Xcode - Required for building and installing your app on iOS
✓ CocoaPods - Required for installing iOS dependencies
✓ ios-deploy - Required for installing your app on a physical device with the CLI
✖ .xcode.env - File to customize Xcode environment

执行react-native run-ios报错如下

note: Build preparation complete
note: Building targets in dependency order
error: unable to attach DB: error: accessing build database “/Users/chencheng/Library/Developer/Xcode/DerivedData/GitHub_RN-ektiowgalqykkvbsaxhxrreqmess/Build/Intermediates.noindex/XCBuildData/build.db”: database is locked Possibly there are two concurrent builds running in the same filesystem location.
warning: no rule to process file ‘/Users/chencheng/rn-app/GitHub_Advanced/ios/Pods/Flipper-RSocket/rsocket/README.md’ of type ‘net.daringfireball.markdown’ for architecture ‘x86_64’ (in target ‘Flipper-RSocket’ from project ‘Pods’)
warning: no rule to process file ‘/Users/chencheng/rn-app/GitHub_Advanced/ios/Pods/Flipper-RSocket/rsocket/benchmarks/CMakeLists.txt’ of type ‘text’ for architecture ‘x86_64’ (in target ‘Flipper-RSocket’ from project ‘Pods’)
warning: no rule to process file ‘/Users/chencheng/rn-app/GitHub_Advanced/ios/Pods/Flipper-RSocket/rsocket/benchmarks/README.md’ of type ‘net.daringfireball.markdown’ for architecture ‘x86_64’ (in target ‘Flipper-RSocket’ from project ‘Pods’)

2022-05-23 22:44:50.642 xcodebuild[31933:24282107] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionSentinelHostApplications for extension Xcode.DebuggerFoundation.AppExtensionHosts.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
2022-05-23 22:44:50.642 xcodebuild[31933:24282107] Requested but did not find extension point with identifier Xcode.IDEKit.ExtensionPointIdentifierToBundleIdentifier for extension Xcode.DebuggerFoundation.AppExtensionToBundleIdentifierMap.watchOS of plug-in com.apple.dt.IDEWatchSupportCore
** BUILD FAILED **

执行react-native run-android报错如下
FAILURE: Build failed with an exception.

  • What went wrong:
    Could not determine the dependencies of task ‘:app:mergeDebugAssets’.

Could not resolve all task dependencies for configuration ‘:app:debugRuntimeClasspath’.
Could not resolve com.facebook.react:react-native:+.
Required by:
project :app
project :app > project :trackshare
project :app > project :react-native-community_async-storage
project :app > project :react-native-community_masked-view
project :app > project :react-native-code-push
project :app > project :react-native-gesture-handler
project :app > project :react-native-reanimated
project :app > project :react-native-safe-area-context
project :app > project :react-native-screens
project :app > project :react-native-splash-screen
project :app > project :react-native-vector-icons
project :app > project :react-native-webview
Failed to list versions for com.facebook.react:react-native.
Unable to load Maven meta-data from https://dl.bintray.com/umsdk/release/com/facebook/react/react-native/maven-metadata.xml.
Could not get resource ‘https://dl.bintray.com/umsdk/release/com/facebook/react/react-native/maven-metadata.xml’.
Could not GET ‘https://dl.bintray.com/umsdk/release/com/facebook/react/react-native/maven-metadata.xml’. Received status code 502 from server: Bad Gateway

  • 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 8s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
Warning: Mapping new ns http://schemas.android.com/repository/android/common/02 to old ns http://schemas.android.com/repository/android/common/01

课程刚买来,代码没有改过。想启动项目来看看整个app,结果一直启动不了,这两天都在捣鼓这个还是解决不了,特来请教。

写回答

1回答

CrazyCodeBoy

2022-05-24

建议选择运行各章节的源码:https://git.imooc.com/coding-304
0
0

RN入门到进阶,打造高质量上线App

解锁React Native开发应用新姿势,React Native新版本热门技术

3144 学习 · 3241 问题

查看课程