-
Notifications
You must be signed in to change notification settings - Fork 786
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
升级到新版本 Android 日期选择会崩溃 #83
Comments
你是怎么升级的?说下详细的升级步骤,看看是不是什么地方遗漏了 |
是这样的,之前使用的3.0.5 现在升到4.0.8版本,然后按照demo重新实现了日期组件。ios下调试正常,android下就出现崩溃现象,其他利用react-native-picker实现的选项不存在这种问题。 |
错误日志贴一下 |
使用最新的 |
当年份为 下列代码可以正常运行 function createDateData(){
let date = [];
for(let i=2035;i<2050;i++){
let month = [];
for(let j = 1;j<13;j++){
let day = [];
if(j === 2){
for(let k=1;k<29;k++){
day.push(k+'日');
}
}
else if(j in {1:1, 3:1, 5:1, 7:1, 8:1, 10:1, 12:1}){
for(let k=1;k<32;k++){
day.push(k+'日');
}
}
else{
for(let k=1;k<31;k++){
day.push(k+'日');
}
}
let _month = {};
_month[j+'月'] = day;
month.push(_month);
}
let _date = {};
_date[i+'年'] = month;
date.push(_date);
}
return date;
}; 下列代码会闪退 function createDateData(){
let date = [];
for(let i=2034;i<2050;i++){
let month = [];
for(let j = 1;j<13;j++){
let day = [];
if(j === 2){
for(let k=1;k<29;k++){
day.push(k+'日');
}
}
else if(j in {1:1, 3:1, 5:1, 7:1, 8:1, 10:1, 12:1}){
for(let k=1;k<32;k++){
day.push(k+'日');
}
}
else{
for(let k=1;k<31;k++){
day.push(k+'日');
}
}
let _month = {};
_month[j+'月'] = day;
month.push(_month);
}
let _date = {};
_date[i+'年'] = month;
date.push(_date);
}
return date;
}; |
确实如此,RN 0.36这个问题仍存在,看来只能等更新了 |
我的rn0.36 android跑example选日期一样崩溃 |
嗯,我们已经去官方提issue了但是还没有回复:facebook/react-native#10590 (comment) 我们也尝试了放弃 |
闪退问题有结论了么,我RN0.38.0的,魅族上2005-2020都直接崩溃了,是性能问题么? |
@ALL |
我的0.38安卓也是崩溃,在三星note3上,还有华为p8上也是一样的 |
@iamdurui 离线包也会崩溃? |
晕..为啥2035年后就不会崩溃...0.40的RN版本 |
@JusticeLai 打成离线包你可以从1905开始都不会崩溃 |
|
@shexiaoheng 哥,那这个怎么办啊?我主要开发安卓,安卓上的debug模式老是崩溃,没法弄了啊, |
@iamdurui 减少数据量,看上面我发的第三条评论,你可以只写2015年到2020年的,应该不影响你调试 |
fix personal_type
项目中一直利用react-native-picker实现日期组件,然而从JS升到原生版本后,
Android在调试模式下直接崩溃,release版偶尔也会出现,RN版本0.35。
是否跟pickerData的数据量有关?
The text was updated successfully, but these errors were encountered: