体验最新版AndroidStudio3.0 Canary 8的时候,发现之前项目的butter knife报错,用到注解的应该都会报错Error:Execution failed for task ':app:javaPreCompileDebug'.> Annotation processors must be explicitly declared now. The following dependencies on the compile classpath are found to contain annotation processor. Please add them to the annotationProcessor configuration. - butterknife-7.0.1.jar Alternatively, set android.defaultConfig.javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true to continue with previous behavior. Note that this option is deprecated and will be removed in the future. See https://developer.android.com/r/tools/annotation-processor-error-message.html for more details.在app的build中android { ... defaultConfig { ... //添加如下配置就OK了 javaCompileOptions { annotationProcessorOptions { includeCompileClasspath = true } } } ...}
Mr.Smile填坑记——AndroidStudio3.0 Can
-
coturn配置文件详细解释
Coturn 是webrtc,p2p视频通话必不少的,主要包含2个主要功能stun服务, turn服务 Coturn 的githup地址为 https://github.com/coturn/coturn/
-
Appcode操作cocaopods,编辑podfile
appcode解决podfile 无法编辑的问题,appcode可以很轻松的便捷podfile
-
iOS #import ""和#import <>区别
import尖括号,是引用的库文件比如pod引入的文件
-
为UIView添加点击事件
最近经常碰到要将UIImageView和UILabel看成整体的情况,我于是就将他俩用UIView包起来,那么怎么给一个UIView添加点击事件,可以这么实现:
-
ios按钮中代添加按钮事件的代码写法
创建按钮时添加如下代码:
-
Window.matchMedia() 方法详解
matchMedia() 返回一个新的 MediaQueryList 对象,表示指定的媒体查询字符串解析后的结果。 matchMedia() 方法的值可以是任何一个 CSS @media 规则 的特性, 如 min-height, min-width, orientation 等。 MediaQueryList 对象有以下两个属性:
-
iframe.contentWindow 操作iframe
注:iframe.contentWindow这里,返回的是iframe的window对象,所以后面可以接着调用document方法,再接着调用getElementByTagName。那么就可以对iframe里面的元素进行操作了。
-
iframe + postMessage跨域通信
在实际项目开发中可能会碰到在 a.com 页面中嵌套 b.com 页面,这时第一反应是使用 iframe,但是产品又提出在 a.com 中操作,b.com 中进行显示,或者相反。
-
ios开发优秀的开源框架,demo集合
期待大家和我们一起共同维护,同时也期望大家随时能提出宝贵的意见(直接提交issues即可)。请广大网友只按照目录结构(即使目录结构有问题)添加三方库,并提交pull request。目录问题大家提出issues后楼主会及时更改的。
-
framework not found AFNetworking
啥也不用配置,重新用不xcworkspace打开工程就好了