大概整理下升级到Android Studio3.0遇到的问题

来源:互联网 发布:wow数据库 编辑:程序博客网 时间:2024/06/05 07:11

1.apt不支持了

apply plugin: 'android-apt' 去掉
将apt改成annotationProcessor 
例如:
apt 'com.google.dagger:dagger-compiler:2.0.2'compile 'com.google.dagger:dagger:2.0.2'
 改成

annotationProcessor 'com.google.dagger:dagger-compiler:2.0.2'

compile 'com.google.dagger:dagger:2.0.2'

2.原生支持java1.8了

apply plugin: 'me.tatarka.retrolambda'干掉.原生支持lambda了

3.报错

Error:Execution failed for task ':app:compileDebugNdk'.> Error: Flag android.useDeprecatedNdk is no longer supported and will be removed in the next version of Android Studio.  Please switch to a supported build system.  Consider using CMake or ndk-build integration. For more information, go to:
android.useDeprecatedNdk=true这句话注释掉,不支持了
用cmakelist打包.so文件
怎么使用?这里直接去看人的吧  http://blog.csdn.net/cuiyufeng2/article/details/64125594
但是你可以会遇到如下错误
More than one file was found with OS independent path 'lib/armeabi/libserial_port.so'
 jni.srcDirs = ['src/main/jni', 'src/main/jni/']改成
jniLibs.srcDirs = [] clean一下重新编译就好了;
如果还不行去掉这句话试试 
jniLibs.srcDirs = ['libs']
4.还是报错
Error:(101, 5) error: style attribute '@android:attr/windowExitAnimation' not found.
gradle.properties里面加入android.enableAapt2=false 就好了,这个也是网上搜的

解决了以上问题,只记得这么四个了,记录下来




阅读全文
0 0
原创粉丝点击