更新时间:2017年11月01日 12:00:53 作者:翻越高山 Android Studio从3.0版本新增了许多功能,当然首当其冲就是从3.0版本新增了对 Kotlin 开发语言的支持,除此之外还有其他一些新功能。很多小伙伴在android studio 3.0 升级项目遇到很多问题,下面小编给大家分享一些问题小结及解决办法,一起看看吧 Android Studio从3.0版本新增了许多功能,当然首当其冲就是从3.0版本新增了对 Kotlin 开发语言的支持,除此之外还有其他一些新功能,例如:Android Profiler (其中包含了: CPU Profiler、Memory Profiler、Network Profiler ),APK Debugger,Device File Explorer,Java 8 Language Features等。 android studio 3.0版本升级问题修改: ===》 问题一
===》解决方法: Warning:android-apt plugin is incompatible with future version of Android Gradle plugin. Please use 'annotationProcessor' configuration instead. 原因:更新Android studio 原来项目出现问题。 分析: 尤其是采用butterknife工具的,采用新的Android Studio都会出现这样的问题,本人根据提示最后猜测原因可能是Android studio更新,然后gradle更新了,这样的话可能使原来的android-apt 工具跟不上节奏了,所以让采用annotationProcessor工具。 解决: 把project下的build.gradle 当中的依赖 修改成如下:
然后再把module下的build.gradle : 修改如下:
再把 apply plugin: 'com.neenbedankt.android-apt ' 这个引用给删除。 重新reBuild的一下 ===》 问题二 Error:Execution failed for task ':wigetlib:javaPreCompileDebug'. 解决方法: 在app的build中
=====》 问题三 Information:Gradle tasks [:pickerview:generateDebugSources, :pickerview:generateDebugAndroidTestSources, :pickerview:mockableAndroidJar, :zhxflib:generateDebugSources, :zhxflib:generateDebugAndroidTestSources, :zhxflib:mockableAndroidJar, :wigetlib:generateDebugSources, :wigetlib:generateDebugAndroidTestSources, :wigetlib:mockableAndroidJar, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar] 解决方法: 在项目的gradle.properties中:
修改了以上问题,我的项目可以正常运行了!!! 总结 以上所述是小编给大家介绍的android studio 3.0 升级 项目遇到的问题及更改思路(问题小结),希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对脚本之家网站的支持! 原文链接:http://blog.csdn.net/wuqilianga/article/details/78354454?readlog |
|