Installing build/Build/Products/Debug-iphonesimulator/roam.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/roam.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist
Run Code Online (Sandbox Code Playgroud)
我尝试了一切.要记住的是我甚至能够使它在xcode中工作.React-native升级,npm安装和终止端口都无法正常工作.请帮忙.
当我添加固定高度样式时,它可以工作并且内容在那里,但是当我将它设置为 flex:1 (正确的方式)时,滚动视图与内容一起消失。
我的代码:
<ScrollView contentContainerStyle={{flex:1}} showsVerticalScrollIndicator={false}>
<View style={{padding: 5}}>
<Text>search</Text>
</View>
<View style={{padding: 5}}>
<Text>New Matches</Text>
<ScrollView contentContainerStyle={{flex:1}} horizontal={true} showsHorizontalScrollIndicator={false}>
<View style={{padding: 10}}>
<Thumbnail medium circle source={require('../assets/placeholders/profile1.jpg')}/>
<Text>Christian</Text>
</View>
<Text>works</Text>
<Text>works</Text>
<Text>works</Text>
<Text>works</Text>
<Text>works</Text>
</ScrollView>
Run Code Online (Sandbox Code Playgroud)
另外,如您所见,我有两个滚动视图。我指的是最外面的(垂直滚动视图)。
现在我正在将一个带有端点的数组映射到我的 API。从那里,我将获取每个链接并在我映射的每个事物上调用 get 请求。我的问题是我无法将所有内容保存到我的 redux 状态。我曾尝试使用 concat 和 push 来获取所有内容,并将其全部放入我的 redux 状态中的一个数组中。
MomentContent.js:
componentDidMount () {
this.props.photos.map(photo => {
this.props.fetchPhoto(this.props.token, photo)}
)
}
Run Code Online (Sandbox Code Playgroud)
index.js(动作):
export const fetchPhoto = (token, photo) => dispatch => {
console.log('right token')
console.log(token);
fetch(photo, {
method: 'GET',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json',
'Authorization': `Token ${token}`,
}
})
.then(res => res.json())
.then(parsedRes => {
console.log('photo data')
console.log(parsedRes)
dispatch(getPhoto(parsedRes))
})
}
export const getPhoto = (photo) => {
console.log('RES')
console.log(photo)
return {
type: GET_PHOTO,
photo: photo
} …Run Code Online (Sandbox Code Playgroud) 我得到的更具体的错误是:警告:道具类型失败:道具store在中标记为必需Provider,但其值为undefined。
store.js
const initialState = {};
const storage = createSensitiveStorage({
keychainService: "myKeychain",
sharedPreferencesName: "mySharedPrefs"
});
const config = {
key: "root",
storage,
};
const middleware = [thunk];
const reducer = persistCombineReducers(config, rootReducer);
export default () => {
let store = createStore(
reducer,
initialState,
compose(applyMiddleware(...middleware))
);
let persistor = persistStore(store);
return { store, persistor }
}
Run Code Online (Sandbox Code Playgroud)
用于减速器的index.js:
export default combineReducers({
profile: profileReducer,
auth: authReducer,
photoSlider,
trip: tripReducer,
moment: momentReducer
})
Run Code Online (Sandbox Code Playgroud)
App.js:
import {store, persistor} from …Run Code Online (Sandbox Code Playgroud) 所以我目前可以在框外单击时关闭模态,但问题是当我在框内单击时它仍然关闭。我试过添加pointerEvents="none",这似乎不起作用。
这是我的代码:
<View>
<Modal
animationType="slide"
transparent={true}
style={{width: '100%', alignSelf: 'center', height: '100%', justifyContent: 'flex-start', backgroundColor:'green'}}
visible={this.state.modalVisible}
onRequestClose={() => {
alert('Modal has been closed.');
}}>
<TouchableWithoutFeedback onPress={() => {
this.setModalVisible(!this.state.modalVisible);
}}>
<View style={{ backgroundColor: 'red', flex: 1}} >
<View pointerEvents="none" style={{alignSelf: 'center', width: '80%', height: '50%', backgroundColor: 'purple', top: 100}}>
<Text pointerEvents="none" >Hello World!</Text>
</View>
</View>
</TouchableWithoutFeedback>
</Modal>
</View>
Run Code Online (Sandbox Code Playgroud)