Problems encountered in Android studio 3.0 upgrade project and change ideas (summary of problems)

Android studio has added many functions from version 3.0. Of course, the first is the new support for kotlin development language from version 3.0. In addition, there are other new functions, such as Android profiler (including CPU profiler, memory profiler and network Profiler), APK debugger, device file explorer, Java 8 language features, etc.

Android studio version 3.0 upgrade problem modification:

===Question 1

===Solution:

Warning:android-apt plugin is incompatible with future version of Android Gradle plugin. Please use ‘annotationProcessor' configuration instead.

Cause: there is a problem updating the original project of Android studio.

Analysis: especially for those who use the butterknife tool and the new Android studio, I guess the reason may be that Android studio is updated and gradle is updated. In this way, the original Android apt tool may not keep up with the section, so let's use the annotationprocessor tool.

Solution: put the dependency in build.gradle under project

Amend to read as follows:

Then add build.gradle under module:

Amend as follows:

Delete the reference to apply plugin: 'com. Neenbedankt. Android apt'.

Rebuild

===Question 2

Error:Execution Failed for task ':wigetlib: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 (com.jakewharton:butterknife:7.0.1) 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.

resolvent:

In the build of app

=====Question 3

Information:Gradle tasks [:pickerview:generateDebugSources,:pickerview:generateDebugAndroidTestSources,:pickerview:mockableAndroidJar,:zhxflib:generateDebugSources,:zhxflib:generateDebugAndroidTestSources,:zhxflib:mockableAndroidJar,:wigetlib:generateDebugSources,:wigetlib:generateDebugAndroidTestSources,:wigetlib:mockableAndroidJar,:app:generateDebugSources,:app:generate DebugAndroidTestSources,:app:mockableAndroidJar] D:\zhihuixinfanWorkerSpace\ZhiHuiXinFan\app\build\intermediates\manifests\full\debug\AndroidManifest.xml Error:(12) error: unkNown element <uses-library> found. Error:(12) unkNown element <uses-library> found. Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details Error:com.android.tools .aapt2.Aapt2Exception: AAPT2 error: check logs for details Error:Execution Failed for task ':app:processDebugResources'. > Failed to execute aapt Information:BUILD Failed in 8s Information:6 errors Information:0 warnings Information:See complete output in console

resolvent:

In gradle.properties of the project:

android.enableAapt2=false

After modifying the above problems, my project can run normally!!!

summary

The above is a summary of the problems encountered in the Android studio 3.0 upgrade project introduced by Xiaobian. I hope it will be helpful to you. If you have any questions, please leave me a message and Xiaobian will reply to you in time. Thank you very much for your support for the programming tips website!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>