我必须将我要显示的第一个字母大写.我搜索它但我找不到明确的事情,也没有这样的道具text反应本机官方文档.
我用以下格式显示我的文本:
<Text style={styles.title}>{item.item.title}</Text>
Run Code Online (Sandbox Code Playgroud)
要么
<Text style={styles.title}>{this.state.title}</Text>
Run Code Online (Sandbox Code Playgroud)
我该怎么做?
建议欢迎?
我想将我的项目推送到 github,但是我注意到在 android 文件夹中有一个名为java_pid14920.hprof的文件,导致大约 300MB
remote: error: File android/java_pid14920.hprof is 301.75 MB; this exceeds GitHub's file size limit of 100.00 MB
我想知道删除这个文件是否安全?
我会尝试" 如何为react-native生成.ipa文件? "但是我不能得到.ipa文件.
任何一个云你解释如何获得.ipa文件.
React原生文档说python2是必需的,但如果安装了python3怎么办?
如果安装了python3,我会在本机应用中遇到错误吗?
我正在使用Windows 10,我将在Android上运行它.另外,我从这个问题中读到python是必要的.
firebase@3.3.0
react-native v0.32在带有wifi的android设备上测试
Firebase数据库没有任何身份验证规则,它是开放式读写.
给定以下文件结构:
|_ firebase.js
|_ actions.js
Run Code Online (Sandbox Code Playgroud)
这不起作用:
firebase.js
import firebase from 'firebase'
const config = {
apiKey: "*****",
authDomain: "****",
databaseURL: "*****",
storageBucket: "*****",
}
firebase.database.enableLogging(true);
export default firebase.initializeApp(config)
Run Code Online (Sandbox Code Playgroud)
actions.js
import firebase from './firebase'
export const fetchData = () => {
const Data = firebase.database().ref('some/data')
Data.on('value', (snapshot) => {
console.log("snapshot", snapshot.val()) // never printed
}, (error) => {
console.error(error)
})
}
Run Code Online (Sandbox Code Playgroud)
调试输出
p:0: Browser went online.
firebase-database.js:36 p:0: Listen called for /some/data default
firebase-database.js:36 p:0: Making …Run Code Online (Sandbox Code Playgroud) firebase react-native firebase-realtime-database react-native-android
在IOS中,寻找gps coords时没有问题.它工作正常.
在Android方面,它不像IOS那样稳定.在真实设备和模拟器中都存在这个问题.有时它可以找到位置,但有时不会.寻找3天但没有找到解决方案.
当我的应用程序无法找到我的位置时,我尝试通过谷歌地图应用程序,它就像魅力.
这是我的IOS和Android代码;
getCurrentPosition() {
navigator.geolocation.getCurrentPosition(
(position) => {
this.setState({ initialPosition: position });
alert(JSON.stringify(position))
var coords = new Coords();
coords.Latitude = position.coords.latitude;
coords.Longitude = position.coords.longitude;
this.getPharmaciesByCoordinates(coords);
},
(error) => alert(error.message),
{ enableHighAccuracy: true, timeout: 20000, maximumAge: 1000 }
);
this.watchID = navigator.geolocation.watchPosition((position) => {
this.setState({ initialPosition: position });
},
(error) => alert(error.message),
{ enableHighAccuracy: true, timeout: 20000, maximumAge: 1000 }
);
}
Run Code Online (Sandbox Code Playgroud)
欢迎任何类型的解决方案.
谢谢
我想在背景中的一天中的特定时间执行一些任务T.我发现在Android中有可能使用Headless JS.我发现这个库实现了这个https://github.com/vikeri/react-native-background-job并允许你在后台执行东西.
这不完全是我所期待的,它不允许您在特定时间安排任务T. 有谁知道这方面的任何工作?
我已检查此线程执行代码在特定时间反应原生我没有找到我的问题的解决方案.
android ios react-native react-native-android react-native-ios
我一直在尝试将AndroidX集成到我的混合React Native项目中,我遇到了Jetifier不在"本地"项目上运行的问题.这导致我的所有React Native库仍然使用旧的支持库.我已将相应的行放入gradle.properties文件中:
android.useAndroidX=true
android.enableJetifier=true
Run Code Online (Sandbox Code Playgroud)
这适用于任何远程库,但React Native将其所有库作为本地模块放在磁盘上.
我已经尝试了很多东西,但到目前为止,我最好的解决方案是一个post-package脚本,基本上手动替换所有的包,并将库添加/删除到各种gradle脚本.
这是一个非常手动的过程,并不是超级可持续的.有没有更好的方法来处理这个问题?
android react-native react-native-android androidx android-jetifier