Android studio 3.0.1 pit filling notes

Once upon a time, I heard from my colleague Mr. Qiang that IntelliJ idea has powerful functions. It is a commercial IDE (integrated development environment) developed by jet brains, and supports Java, Scala and groovy at the same time. The commercial IDE, IntelliJ, is a paid ide. Of course, there are free community versions, but many functions have been castrated. In addition to supporting Android project development, IntelliJ can also build a java web development environment, which is more powerful than as.

Allah recently reinstalled the computer and thought about installing an IntelliJ, but another colleague said that IntelliJ would conflict with as. At first I thought he was too young to toss. Later, because AS3.0 has some new pits, IntelliJ I didn't succeed at the moment. Finally, I put it down first and deal with it later. After all, I still have to work, but I can't die, yuan.

(1) About annotation

Error:Execution Failed for task ':Framework: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 (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.

The description of the official website of Android studio is as follows:

Use the annotation processor dependency configuration

At the beginning, I found the solution first, and then I saw the link above. Let's talk about the solution first. Add the following to the defaultconfig of build.gradle:

(2) About channels

Error:All flavors must Now belong to a named flavor dimension.Learn more at https://d.android.com/r/tools/flavorDimensions-missing-error-message.html

All flavors must belong to the same style. Combine multiple product flavors

The solution is to add the content of the corresponding flag in build. Gradle.

(3) About sugar

3.0Android: Sugar ORM No Such Table Exception

Sugar is used in the project. In 3.0as, it is always prompted that the table cannot be found. In fact, the solution is very simple, and the website I visited has long said how to deal with it, but I always failed because I missed the key points.

Do not check instant run

last! Uninstall the old application on the device. Be sure to uninstall it! Then run the new application again.

(4) About manifest merge

Execution Failed for task ':AppMain:processVasNormalDebugManifest'. Manifest merger Failed with multiple errors,see logs

This is the first time I know that there are conflicts between manifest and merge. Interesting.

Project directory

In my project, there is an application and a library. Both modules have their own manifest. It turns out that as will help us merge the two manifests in the end, so when the two settings are inconsistent, there will be a conflict and the merge fails. That's the principle. Compare the values in the two manifests and modify them. What do you think of the result of the merger?

For example, if I open the manifest of appmain and select the merged manifest mode below, I can see the final merge result.

Manifest of appmain

I remember my situation: I set Android: allowbackup = "false" for appmain's manifest, then set Android: allowbackup = "true" for framewframework's manifest, and then change it to false. We should see what our actual situation is, and then make corresponding modifications.

summary

The above is the pit filling notes of Android studio 3.0.1 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
分享
二维码
< <上一篇
下一篇>>