[!] The `Demo [Debug]` target overrides the `EXCLUDED_ARCHS[sdk=iphonesimulator*]` build setting defined in `../Pods/Target Support Files/Pods-Demo/Pods-Demo.debug.xcconfig'. This can lead to problems with the CocoaPods installation - Use the `$(inherited)` flag, or - Remove the build settings from the target.
删除Valid Architectures
xcode12的新项目应该默认移除了此项参数。新版xcode不再需要用这个参数来指定archs。
pod依赖的第三方库Target
在podfile中添加钩子
1 2 3 4 5 6 7
post_installdo|installer| installer.pods_project.targets.eachdo|target| target.build_configurations.eachdo|config| config.build_settings['ONLY_ACTIVE_ARCH']='NO' end end end
之所以要这样做,是因为模拟器环境的pod安装时仍然会把开源的依赖以x86形式编译(我推测),也就导致了上面那个building for iOS Simulator-x86_64 but attempting to link with file built for iOS Simulator-arm64错误。因此我们用这段语句让pod强制编译所有arch。
本地用于编译Framework的自有库源码Target
其余配置参考上面的应用Target,但是Build Active Architecture Only这一项需要改为NO,也就是手动操作了上面pod的那段配置。
最后,记得删除pods目录,删除项目缓存,然后再执行编译。
解决方案3
其他操作都类似方案2,但是将pod和自有库的那个Build Active Architecture Only配置项,改为操作Excluded Architectures。具体操作为:
pod依赖的第三方库Target
在podfile中添加钩子
1 2 3 4 5
post_installdo|installer| installer.pods_project.build_configurations.eachdo|config| config.build_settings["EXCLUDED_ARCHS[sdk=iphonesimulator*]"]="arm64" end end
本地用于编译Framework的自有库源码Target
Debug下的Build Active Architecture Only保持YES,但是Excluded Architectures设置为arm64。
evaluating expression 'ew.customSqlSegment'. Cause: org.apache.ibatis.ognl.OgnlException: customSqlSegment [com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: can not find lambda cache for this entity
SELECT CONCAT( 'ALTER TABLE `', TABLE_NAME, '` MODIFY `', COLUMN_NAME, '` ', DATA_TYPE, '(', CHARACTER_MAXIMUM_LENGTH, ') CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci', ( CASE WHEN IS_NULLABLE = 'NO' THEN ' NOT NULL' ELSE '' END ), ';' ) FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = '数据库名' AND ( DATA_TYPE = 'varchar' OR DATA_TYPE = 'char')
批量修改表
1 2 3 4 5 6
SELECT CONCAT( 'ALTER TABLE ', TABLE_NAME, ' CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;' ) FROM information_schema.TABLES WHERE TABLE_SCHEMA = '数据库名';