
获得徽章 3
- 当文件从windows复制到macos后命令跑不起来时解决方案。
1、brew install dos2unix
2、find . -type f -exec dos2unix {} \;
第二步的分号前有个\
如果已安装了dos2unix,可省略第一步展开评论点赞 - ios开发时出现“Obtaining the web lock from a thread other than the main thread or the web thread. UIKit should not be called from a secondary thread”,解决方法
To solve this try the following
dispatch_sync(dispatch_get_main_queue(), ^{
//Call the function from here
});展开评论点赞 - 最近使用CocoaPods来添加第三方类库,无论是执行pod install还是pod update都卡在了Analyzing dependencies不动了,令人甚是DT。
查了好多的资料,原因在于当执行以上两个命令的时候会升级CocoaPods的spec仓库,加一个参数可以省略这一步,然后速度就会提升不少。加参数的命令如下:
pod install --verbose --no-repo-update
pod update --verbose --no-repo-update展开评论点赞 - Build on device fails with exit code 1
Make sure you're opening the .xcworkspace and not the .xcproject file in Xcode. Close the project and open .xcworkspace展开评论点赞 - Build input file cannot be found: ‘…/node_modules/react-native/Libraries/WebSocket/libfishhook.a’
解决方案:
按照1-2-3步骤进行先删除掉libfishhook.a文件,然后再重新加入即可展开评论点赞 - RN 运行ios端出现third-party: 'config.h' file not found 解决方案这个是常见错误,只需要在项目根目录下运行以下命令即可解决:
cd node_modules/react-native/third-party/glog-0.3.4
../../scripts/ios-configure-glog.sh展开评论点赞 - mac上android模拟器无法访问网络时解决方法。
My solution using Mac OSX 10.13
I read about it being caused by LAN card and WiFi being enabled, and some approaches seemed complicated to me, so I simply tried this, and it worked:
Disabled WiFi on my laptop.
Switched off the emulator.
Did a cold boot on the emulator (AVD Manager -> on emulator actions -> Cold Boot Now).
After reboot with WiFi disabled the emulator showed proper WiFi connection. I then enabled WiFi on my laptop and everything worked.展开评论点赞 - mac下 编译php的 openssl
编译openssl.so
tar zxvf php-7.2.8.tar.gz
# 进入PHP的openssl扩展模块目录
cd php-7.2.8/ext/openssl/
brew install openssl
#注:此处生成的openssl/1.0.2q/以您电脑显示的为准,有的为1.0.2s
./configure --with-openssl=/usr/local/Cellar/openssl/1.0.2q/
或
./configure --with-openssl=/usr/local/Cellar/openssl/1.0.2q --with-php-config=/Applications/MAMP/bin/php/php7.2.8/bin/php-config
make && make install展开评论点赞