试图在Android 4.4.2上创建一个react-native项目我得到了这个错误屏幕
并且找不到任何解决方法.我尝试重新启动打包器,重新连接设备,甚至重新安装反应原生和启动新项目.在6.0.0及更高版本上,它工作得很好.
我定义了两个TextInput字段,如下所示:
<TextInput
style = {styles.titleInput}
returnKeyType = {"next"}
autoFocus = {true}
placeholder = "Title" />
<TextInput
style = {styles.descriptionInput}
multiline = {true}
maxLength = {200}
placeholder = "Description" />
Run Code Online (Sandbox Code Playgroud)
但是在按下键盘上的"下一步"按钮后,我的react-native应用程序没有跳转到第二个TextInput字段.我怎样才能做到这一点?
谢谢!
我正在探索React Native的可能性,同时在Navigator组件的帮助下开发一个在视图之间自定义导航的演示应用程序- http://facebook.github.io/react-native/docs/navigator.html#content
主app类渲染navigator和inside Navigator返回传递的组件:
class App extends React.Component {
render() {
return (
<Navigator
initialRoute={{name: 'WelcomeView', component: WelcomeView}}
configureScene={() => {
return Navigator.SceneConfigs.FloatFromRight;
}}
renderScene={(route, navigator) => {
// count the number of func calls
console.log(route, navigator);
if (route.component) {
return React.createElement(route.component, { navigator });
}
}}
/>
);
}
}
Run Code Online (Sandbox Code Playgroud)
现在app包含2个视图:
class FeedView extends React.Component {
render() {
return (
<View style={styles.container}>
<Text>
Feed View!
</Text>
</View>
);
}
}
class WelcomeView extends …Run Code Online (Sandbox Code Playgroud) 我目前正在阅读React-Native教程.我从入门教程开始,在那里我做了一个新的反应原生项目并成功设法在我的设备上运行项目.
然后我启动了Props教程,我复制了代码片段并尝试再次运行该项目并在屏幕上显示以下错误消息:

最近我开始收到此错误:
Info.plist中必须存在NSPhotoLibraryUsageDescription键才能使用相机胶卷.
我正在使用React Native来构建我的应用程序(我不熟悉ios本机开发),我不知道如何将此键添加到Info.plist
你能发一个例子吗?谢谢
我正在使用npm包 "react-native-camera-roll-picker": "^1.1.7"
我正在使用React.JS,当我这样做时react-native run-android(插入我的设备),我看到一个空白页面.当我摇动设备并Debug JS Remotely从选项列表中选择时,我会看到以下屏幕.
供参考:
OS: Ubuntu 16.04
Node version is: v4.6.2
java version "1.8.0_111"
react": "15.4.1
react-native": "0.38.0
Run Code Online (Sandbox Code Playgroud) 我曾经react-native init MyApp初始化一个新的React Native应用程序.这创建了包含该项目的Android项目com.myapp.
更改此包名称的最佳方法是什么,例如:com.mycompany.myapp?
我尝试更改它AndroidManifest.xml但它创建了其他错误,所以我假设它不是那样的.
任何的想法?
你能否render在React组件中的方法中使用注释?
我有以下组件:
'use strict';
var React = require('react'),
Button = require('./button'),
UnorderedList = require('./unordered-list');
class Dropdown extends React.Component{
constructor(props) {
super(props);
}
handleClick() {
alert('I am click here');
}
render() {
return (
<div className="dropdown">
// whenClicked is a property not an event, per se.
<Button whenClicked={this.handleClick} className="btn-default" title={this.props.title} subTitleClassName="caret"></Button>
<UnorderedList />
</div>
)
}
}
module.exports = Dropdown;
Run Code Online (Sandbox Code Playgroud)

我的评论显示在用户界面中.
处理评论的正确方法是什么?
更新:
谢天谢地,这有效:
'use strict';
var React = require('react'),
Button = require('./button'),
UnorderedList = require('./unordered-list');
class Dropdown extends …Run Code Online (Sandbox Code Playgroud) 我刚刚更新到 RN v0.62 并且在 iOS 上运行应用程序给了我以下错误
!] CocoaPods could not find compatible versions for pod "ReactCommon/jscallinvoker":
In snapshot (Podfile.lock):
ReactCommon/jscallinvoker (from `../node_modules/react-native/ReactCommon`)
In Podfile:
ReactCommon/jscallinvoker (from `../node_modules/react-native/ReactCommon`)
None of your spec sources contain a spec satisfying the dependency: `ReactCommon/jscallinvoker (from `../node_modules/react-native/ReactCommon`)`.
Run Code Online (Sandbox Code Playgroud)
我删除了所有 node_modules 并做了 npm i。我也在iOS目录中安装了pod,但问题仍然存在。我也做了 pod repo 更新。
react-native ×10
reactjs ×5
android ×4
ios ×3
javascript ×2
cocoapods ×1
facebook ×1
info.plist ×1
navigation ×1