如果我尝试从XCode运行我的react-native应用程序,xcode将失败并显示以下消息:
当前部署目标不支持-fobjc-weak
如果我从shell运行react-native run-ios,那么我也会收到一条错误消息:
**建筑失败**
以下构建命令失败:CompileC /Users/michel/Development/Androdev/Firebase/Sample/FlightLogIos/ios/build/Build/Intermediates.noindex/Pods.build/Debug-iphonesimulator/nanopb.build/Objects-normal/x86_64/ nanopb-dummy.o Target\Support\Files/nanopb/nanopb-dummy.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1次失败)
但是,该应用仍然运行.这很令人讨厌,因为我认为我会在某些时候为我的项目做一些Objective C代码.有人知道如何解决这个问题吗?
我react-native start在一个终端运行,然后react-native ios-run在另一个终端运行.我最初console.log很少表现,有时他们会这样做.
很多次,随机我看到:
日志消息语录超出 - 此过程中的一些消息已被丢弃
我console.log被丢弃了吗?我试着清理控制台以便更清楚地看到它,但我也找不到清除控制台的方法.
在Android上,我不会有丢失的问题console.log.
我正在使用Native-Base.我需要使用单选按钮,但它们不起作用.当你点击没有任何反应.这是代码.
import React, { Component } from 'react';
import { Container, Header, Content, ListItem, Text, Radio, Right } from 'native-base';
export default class RadioButtonExample extends Component {
render() {
return (
<Container>
<Header />
<Content>
<ListItem>
<Text>Daily Stand Up</Text>
<Right>
<Radio selected={false} />
</Right>
</ListItem>
<ListItem>
<Text>Discussion with Client</Text>
<Right>
<Radio selected={true} />
</Right>
</ListItem>
</Content>
</Container>
);
}
}
Run Code Online (Sandbox Code Playgroud)
我怎样才能使它工作?请不要发送仅包含单选按钮功能的不同库.我已经检查了不同的单选按钮库.只需要在此代码中添加一些内容即可使其正常工作.
react-native react-native-android native-base react-native-ios
我想使用expokit和其他本机库,我该怎么做?
我是否需要使用create-react-native-app启动我的应用程序,然后将其分离,或者我可以从react-native init应用程序启动?
我在iOS模拟器上运行的React Native的SVG库存在问题.
"dependencies": {
"better-fetch": "^1.1.2",
"firebase": "^4.8.1",
"lodash": "^4.17.4",
"react": "16.0.0",
"react-native": "0.51.0",
"react-native-svg": "^6.0.1-rc.1",
"react-redux": "^5.0.6",
"redux": "^3.7.2",
"redux-logger": "^3.0.6",
"redux-thunk": "^2.2.0"
}
Run Code Online (Sandbox Code Playgroud)
我试过以下无济于事:
npm install react-native-svg --save //(again)
react-native link react-native-svg //(again)
watchman watch-del-all
rm -rf node_modules/ && yarn cache clean && yarn install
Run Code Online (Sandbox Code Playgroud)
我需要在本机反应中实现AutoCompleteTextView。问题是没有这样的内置组件。可以用来模拟此功能的所有模块和库并不完全相似。主要问题是建议未出现在视图上方(例如选择框/选择器的建议)。即使是那样,它与KeyboardAvoidingView的表现也不完美。整个问题是它不能像Android的本机AutoCompleteTextView一样工作
另一种解决方案是使用本机UI元素。但是我想要这个组件同时适用于iOS和Android。任何帮助,将不胜感激。
PS:对不起,我正在使用移动设备时输入错误。
android ios react-native react-native-android react-native-ios
我试过__CODE__等等但是没有一个在哪里工作正常.任何人都可以建议我__CODE__从设备存储中选择文件.
我一直在寻找一种限制用户的解决方案,只需点击一下本机就可以退出应用程序.
double-click exit react-native react-native-android react-native-ios
使用React Native Fetch API时遇到问题。很多次请求失败。我有高速连接。但是很多次失败了。该问题正在android和ios中同时发生。
const shoppingApi = 'myserverlink';
async function Sendshoppinapi(data) {
try {
let response = await fetch(shoppingApi, {
method: 'POST',
headers: {
'Accept': 'application/json',
'content-type':'multipart/form-data'
},
body: data
});
let responseJson = await response.json();
return responseJson;
}
catch (error) {
Alert.alert(error.toString())
}
}
export {Sendshoppinapi};
Run Code Online (Sandbox Code Playgroud)
我发送服务器作为后期请求的数据
add_to_wishlist = (item,index) => {
{
let data = new FormData();
data.append('methodName', 'add_to_wishlist');
data.append('user_id', global.userid)
data.append('item_id', this.props.navigation.state.params.itemid.toString())
Sendshoppinapi(data).then((responseJson)=>{
console.warn(responseJson);
if(responseJson.responseCode == '200'){
this.setState({fav:false})
Alert.alert('SHOPPING','Item added to wishlist successfully.',[{text: 'OK',},],{ cancelable: false }) …Run Code Online (Sandbox Code Playgroud) 我正在一个现有的React Native项目上,在XCode日志输出中,我得到了以下错误的源源不断
2019-01-09 12:15:49.005630+0000 App [13746:3543026] [] nw_socket_handle_socket_event [C10.1:1] Socket SO_ERROR [61: Connection refused]
2019-01-09 12:15:49.016640+0000 App [13746:3543026] [] nw_socket_handle_socket_event [C10.2:1] Socket SO_ERROR [61: Connection refused]
2019-01-09 12:15:49.017800+0000 App [13746:3543010] [] nw_connection_get_connected_socket [C10] Client called nw_connection_get_connected_socket on unconnected nw_connection
Run Code Online (Sandbox Code Playgroud)
我该如何找出错误的出处?它似乎并没有影响应用程序,但我想了解这个问题。我怀疑这不是应用程序的JavaScript代码,而是所使用的pod之一:
pod 'Firebase/Core'
pod 'Firebase/Messaging'
pod 'Firebase/Crash'
Run Code Online (Sandbox Code Playgroud) react-native-ios ×10
react-native ×9
ios ×3
xcode ×2
android ×1
cocoapods ×1
double-click ×1
exit ×1
native-base ×1
reactjs ×1
svg ×1