Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What does Android Studio3.0.1 need to pay attention to?

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article mainly introduces what Android Studio3.0.1 needs to pay attention to, the article is very detailed, has a certain reference value, interested friends must read it!

(1) Notes

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 official website of Android Studio is described as follows:

Use the annotation processor dependency configuration

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

Apply plugin: 'com.android.application'android {... defaultConfig {... / Big Brother, this way ~ javaCompileOptions {annotationProcessorOptions {includeCompileClasspath true}}

(2) on 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. Chinese explanation on the official website: combine multiple product flavors

The solution is to add the contents of the corresponding flag to the build.gradle.

FlavorDimensions ("vas", "normal") / / introduce productFlavors {vas {dimension 'vas' buildConfigField "boolean", "ENABL_VAS", "true" dimension "vas" / / introduce} normal {dimension' normal' buildConfigField "boolean", "ENABL_VAS", "false" dimension "normal" / / and other}}

(3) about Sugar

3.0Android: Sugar ORM No Such Table Exception

Sugar is used in the project, and the table is always prompted not to be found in 3.0AS. In fact, the solution is very simple, and the website I visited said how to deal with it for a long time, but I always failed because I missed the key point.

Instant run do not check

Last! Uninstall the old application on the device, be sure to uninstall it! Then rerun the new application and OK.

(4) about Manifest merger

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

This is the first time I know that there is a conflict between Manifest and merge. Interesting.

Project catalog

My project has an application and a library, both of which have their own manifest. It turns out that as will eventually help us merge the two manifest, so when the two settings are inconsistent, there will be a conflict and the merge will fail. That's how it works. Compare what values in the two manifest are very different, just modify it. What do you think of the outcome 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 as follows: I set the manifest of AppMain to android:allowBackup= "false", then the manifest of FramewFramework to android:allowBackup= "true", and then changed Chengdu to false. Everyone should see what their actual situation is, and then make changes accordingly.

The above is all the contents of the article "what do you need to pay attention to in Android Studio3.0.1"? thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report