- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我尝试在裸露(只是react-native init)应用程序中安装react-native-track-player。
之后
yarn add react-native-track-player
yarn add react-native-swift
cd ios
pod instal
我收到消息:
../node_modules/react-native-track-player
)找到了满足 react-native-track-player (from
../node_modules/react-native-track-player)
依赖项的规范,但它们需要更高的最低部署目标。所以我在 podfile 中进行了更改
platform :ios, '9.0' to: platform :ios, '10.0'
再一次
pod install
这会导致消息:
react-native-track-player
未指定 Swift 版本,并且集成它的目标 (mist
) 均未设置 SWIFT_VERSION
属性。请联系作者或至少在集成此 Pod 的目标之一中设置 SWIFT_VERSION
属性。在下一步中,我将 s.swift_version = '4.0' 添加到了node_modules 中的react-native-track-player.podspec 文件中。
现在,react-native-track-player pod 已生成,并带有警告:
PBXBuildFile -- Pods.xcodeproj/targets/buildConfigurationList:buildConfigurations:baseConfigurationReference:|,buildSettings:|,displayName:|,isa:|,name:|,,baseConfigurationReference:|,buildSettings:|,displayName:|,isa:|,name:|,,defaultConfigurationIsVisible:0,defaultConfigurationName:Release,displayName:ConfigurationList,isa:XCConfigurationList,,buildPhases:buildActionMask:2147483647,displayName:Headers,files:|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,isa:PBXHeadersBuildPhase,runOnlyForDeploymentPostprocessing:0,,buildActionMask:2147483647,displayName:Sources,files:|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,|,isa:PBXSourcesBuildPhase,runOnlyForDeploymentPostprocessing:0,,buildActionMask:2147483647,displayName:Frameworks,files:,isa:PBXFrameworksBuildPhase,runOnlyForDeploymentPostprocessing:0,,buildActionMask:2147483647,displayName:Copy generated compatibility header,files:,inputFileListPaths:,inputPaths:|,|,|,isa:PBXShellScriptBuildPhase,name:Copy generated compatibility header,outputFileListPaths:,outputPaths:|,|,|,runOnlyForDeploymentPostprocessing:0,shellPath:/bin/sh,shellScript:COMPATIBILITY_HEADER_PATH="${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h"
MODULE_MAP_PATH="${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap"
ditto "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h" "${COMPATIBILITY_HEADER_PATH}"
ditto "${PODS_ROOT}/Headers/Public/react_native_track_player/react-native-track-player.modulemap" "${MODULE_MAP_PATH}"
ditto "${PODS_ROOT}/Headers/Public/react_native_track_player/react-native-track-player-umbrella.h" "${BUILT_PRODUCTS_DIR}"
printf "\n\nmodule ${PRODUCT_MODULE_NAME}.Swift {\n header \"${COMPATIBILITY_HEADER_PATH}\"\n requires objc\n}\n" >> "${MODULE_MAP_PATH}"
,,buildRules:,dependencies:displayName:React,isa:PBXTargetDependency,,displayName:react-native-track-player,isa:PBXNativeTarget,name:react-native-track-player,packageProductDependencies:,productName:react-native-track-player,productReference:displayName:libreact-native-track-player.a,explicitFileType:archive.ar,includeInIndex:0,isa:PBXFileReference,name:libreact-native-track-player.a,path:libreact-native-track-player.a,sourceTree:BUILT_PRODUCTS_DIR,,productType:com.apple.product-type.l ............
所以我在 podfile 中添加了“install! 'cocoapods', :definistic_uuids => false”
现在 pod install 运行时不会出现警告,但 xcode 或 react-native run-ios 中的构建会因错误而崩溃
这是我的配置:
System:
OS: macOS 10.15.3
CPU: (6) x64 Intel(R) Core(TM) i5-8500B CPU @ 3.00GHz
Memory: 68.81 MB / 8.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 13.8.0 - /usr/local/bin/node
Yarn: 1.22.0 - /usr/local/bin/yarn
npm: 6.13.7 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.2, DriverKit 19.0, macOS 10.15, tvOS 13.2, watchOS 6.1
Android SDK:
API Levels: 28, 29
Build Tools: 28.0.3, 29.0.3
System Images: android-28 | Intel x86 Atom_64, android-29 | Google Play Intel x86 Atom
IDEs:
Android Studio: 3.6 AI-192.7142.36.36.6200805
Xcode: 11.3.1/11C504 - /usr/bin/xcodebuild
npmPackages:
react: ^16.12.0 => 16.12.0
react-native: 0.61.5 => 0.61.5
npmGlobalPackages:
react-native-cli: 2.0.1
和packages.json 文件
{
"name": "first",
"version": "0.0.1",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"test": "jest",
"lint": "eslint ."
},
"dependencies": {
"react": "16.9.0",
"react-native": "0.61.5",
"react-native-swift": "^1.2.2",
"react-native-track-player": "^1.2.2"
},
"devDependencies": {
"@babel/core": "^7.8.4",
"@babel/runtime": "^7.8.4",
"@react-native-community/eslint-config": "^0.0.7",
"babel-jest": "^25.1.0",
"eslint": "^6.8.0",
"jest": "^25.1.0",
"metro-react-native-babel-preset": "^0.58.0",
"react-test-renderer": "16.9.0"
},
"jest": {
"preset": "react-native"
}
}
和 ios/podfile
platform :ios, '10.0'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
install! 'cocoapods', :deterministic_uuids => false
use_frameworks!
target 'neu' do
# Pods for neu
pod 'FBLazyVector', :path => "../node_modules/react-native/Libraries/FBLazyVector"
pod 'FBReactNativeSpec', :path => "../node_modules/react-native/Libraries/FBReactNativeSpec"
pod 'RCTRequired', :path => "../node_modules/react-native/Libraries/RCTRequired"
pod 'RCTTypeSafety', :path => "../node_modules/react-native/Libraries/TypeSafety"
pod 'React', :path => '../node_modules/react-native/'
pod 'React-Core', :path => '../node_modules/react-native/'
pod 'React-CoreModules', :path => '../node_modules/react-native/React/CoreModules'
pod 'React-Core/DevSupport', :path => '../node_modules/react-native/'
pod 'React-RCTActionSheet', :path => '../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../node_modules/react-native/Libraries/Vibration'
pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native/'
pod 'React-cxxreact', :path => '../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../node_modules/react-native/ReactCommon/jsinspector'
pod 'ReactCommon/jscallinvoker', :path => "../node_modules/react-native/ReactCommon"
pod 'ReactCommon/turbomodule/core', :path => "../node_modules/react-native/ReactCommon"
pod 'Yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
target 'neuTests' do
inherit! :search_paths
# Pods for testing
end
use_native_modules!
end
target 'neu-tvOS' do
# Pods for neu-tvOS
target 'neu-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
end
我被困了!任何想法出了什么问题吗?
最佳答案
对于 React Native 版本 >0.60
,请遵循 docs 中的附加安装说明。 :
运行yarn add react-native-track-player
后执行以下操作:
/ios
文件夹中运行 pod install
。react-native-swift
包,例如通过yarn添加react-native-swift
react-native swiftify
。必须完成这些额外的步骤,因为该模块的 iOS 部分是用 Swift 编写的,而不是用 Objective-C 编写的。而且 React Native 不支持用 Swift 编写的开箱即用的桥接模块。
但是对于高于 0.60
的 React Native 版本,不需要其他手动步骤。
关于ios - 如何安装react-native-track-player,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60431824/
我正在努力掌握 perl。我正在尝试编写一些脚本作为调度模拟器。 FCFS、SSTF 和 Scan and Look 我有一个包含 block 请求列表的数组,另一个用作缓冲区。首先,我将复制第一个请
假设我正在ng-repeat处理images,它是一个包含src 和 的对象数组>标题属性。 var images = [ {src: 'a.jpg', caption: 'a'}, {src
“git branch --track”和“git checkout -b --track”之间有什么区别,如果有的话? 最佳答案 内部 git-branch 被调用,然后新分支被 check out
我在自定义 Android Switch 小部件的外观时遇到问题。我有自定义的 xml 可绘制对象,我想将其用于拇指(通常显示开或关的小按钮部分)和轨道(拇指滑过的背景)。当我使用 android:t
文档有点太简单了,我无法完全理解 A controller thus effectively has three modes of operation, determined by whether i
已在 Google Analytics(分析)帮助论坛中发布此内容,但无人能提供帮助。希望我在这里有更多的运气......: 我对我的网页使用 Google Anlaytics 异步跟踪。像个魔法一样
我有一个简单的ng-repeat,其中track by表达式不起作用。这是Fiddle . {{n}} 生成的标记“track”是表达式 [[1,2,3,4,5,5,5,5] track
我想使用 Spotify iOS SDK 从选定的播放列表中获取轨道。但它总是不返回我的数组中的任何项目。我正在使用以下代码来获取轨道: [SPTPlaylistSnapshot playlistWi
我正在尝试将一维数组分配给我的默认构造函数,但我不断收到此错误消息。有没有办法为同一个类创建两个默认构造函数,一个不带参数,一个带参数? 标题 #include #include using na
问题中的答案Android play console: internal testing version, close testing ? how does it works?说: End users
也许有人可以告诉我如何在 Switch() 中设置 Track Width、Track StrokeWidth、Thumb Diameter 的大小 Switch(
我有一个适用于 Android 和 iOS 的移动应用,两者都是使用 Xamarin 构建的。 Android - 该应用会上传到 Beta 轨道 上的 Play 商店,测试完成后,就会升级到生产轨道
我在我的 http 请求中发送一个 Json 格式的用户实体,如下所示: POST http://localhost:52054/api/Authentication/DeleteAccessToke
我正在研究 Java 类介绍的最终项目。该项目的一部分涉及从 MusixMatch using their API 获取歌词片段。我可以使用 track.lyrics.get 从 API 获取歌词,但
我将 ASP.NET Core 与 EFCore 2.0.3 和 Automapper 6.2.2 一起使用 这是我的模型: public class StudentClass {
所以我同时使用 react-native-video 和 react-native-track-player,通常两者都工作正常,但是要使用视频播放器的一些额外功能,比如缓冲,我必须使用 Exo pl
有时我听到人们讨论跟踪编程错误的好处,如果不是为了提高对常见错误的认识的话。我已经开始保留我在代码中发现的错误列表,以及可能导致这些错误的原因。我的主要问题是: 我应该保留哪些与我的错误相关的信息 跟
可以对卡尔曼滤波器更新的估计值应用上限和下限约束吗? 我有一种在实际生活中只能有非负值的状态。当我应用卡尔曼滤波器时,此状态会更新为具有负值。如何在卡尔曼滤波器中应用此限制约束? 请回复 谢谢 最佳答
我正在构建一个使用Sendgrid Marketing Email API的应用程序,目的是发送新闻通讯。它具有许多文章链接,还包括横幅广告和其他服务链接。我们显然希望继续跟踪文章链接,但要排除其他链
我所在的团队管理着许多软件项目 - 我们所做的大部分工作都是端到端的,从需求跟踪到项目管理再到采购和设置 - 财务跟踪是我们的一大难题我们的财务有一个完整的过程。目前我们使用电子表格并将所有发票和采购
我是一名优秀的程序员,十分优秀!