导语
最近试了一下Weex,ios还好基本没有什么坑,比较轻松的跑起来了,但是android不行,有些时候需要改代码才能运行起来。下面来看一下我遇到的一些坑
Configuration ‘compile’ is obsolete and has been replaced with ‘implementation’ It will be removed at the end of 2018
compile会被在2018年底取消,将使用implementation来替代,解决方案就是将Gradle中的compile换成implementation即可。
Annotation processors must be explicitly declared now.
这个主要是在AndroidStudio3.0版本上才会出现的问题,在build.gradle(Module:app)中添加如下配置即可。
android {
…
defaultConfig {
…
javaCompileOptions { annotationProcessorOptions { includeCompileClasspath = true } }
}
…
}
Cannot set the value of read-only property ‘outputFile’
这个也是在升级到AndroidStudio3.0版本才会出现的问题,修改build.gradle(Module:app)中内容,如下所示
参考文献
Configuration ‘compile’ is obsolete and has been replaced with ‘implementation’. It will be removed at the end of 2018
Mr.Smile填坑记——AndroidStudio3.0 Canary 8注解报错Annotation processors must be explicitly declared now.
android studio3.0升级问题记录