Solution to report errors in activity_main.xml in new projects through android-studio

1. Install android-studio (refer to Baidu)

2. Download androidSDK (refer to Baidu)

*(Hint: You can install it directly through the android-studio tool) Recommend! ! !

3. New projects (refer to Baidu)

4. (The focus of this chapter) activity_main.xml error report (error information as shown in the figure)

(The picture comes from the Internet because I have solved it and there is no way to take a screenshot) Hahaha︿( ̄︶ ̄)︿

Cause: This situation occurs, usually because Gradle is not installed properly

Solution:

1. Find the path in the picture generally in C:\Users\your username\.gradle\wrapper\dists\gradle-5.4.1-all\3221gyojl5jsh0helicew7rwx

2. Delete all files with gradle in front (you can directly delete all of them)

 

Three https://services.gradle.org/distributions/ Find the compressed package you need to download on the gradle official website (the version must be the same as the version in the image folder above), otherwise an error will still be reported

As shown in the figure (this is the compressed package of my version)

 

4. Drag the compressed package to the folder you just deleted (as shown in the picture)

 

It is now 80% complete (no need to unzip!!!)

 

Five. Restart android-studio (most of them should have been resolved)

If you still report an error, continue to read

 

6. Click on the little dolphin in the upper right corner

 

7. Wait for the console to turn all green tick and load it is OK (๑•̀ㅂ•́)و✧

 

The code word is not easy to find useful. Like, collect and follow. X﹏X

Unresolved private message me ヾ( ̄▽ ̄) Bye~Bye~

Please indicate the original address of csdn

Author: moerduo0

Ask for a reward! ! !

 

 

Guess you like

Origin blog.csdn.net/moerduo0/article/details/105958653