在xcode升级到Version 9.3 (9E145)之后RN的bug: Values of type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead

更改方式有3种:

  1. 降级xcode
  2. 升级到rn 0.54
  3. 用以下的方法改源码

原来是这样:

//    return [NSString stringWithFormat:@"%@|%g|%g|%g|%zd|%@",
//            imageTag, size.width, size.height, scale, resizeMode, responseDate];

改为这样

  return [NSString stringWithFormat:@"%@|%g|%g|%g|%lld|%@",
          imageTag, size.width, size.height, scale, (long long)resizeMode, responseDate];

就是把%zd -> %lld, 对应的值添加 (long long) 就行了

你可能感兴趣的:(在xcode升级到Version 9.3 (9E145)之后RN的bug: Values of type 'NSInteger' should not be used as format arguments; add an explicit cast to 'long' instead)