Android Studio xml file code automatically prompts invalid/Android Studio code does not automatically prompt/How to set it up so that you do not manually type Android Studio code

The picture below shows what it looked like after I successfully solved the problem of Android not automatically prompting the code (this process took two days, I read all the relevant blogs, and tried various methods without success. But using this method, it can be solved in a few minutes. solved)

My computer has always been in a very strange state, because various bugs always appear when using other software, but I found a suitable method to solve this problem very quickly.

 

1. First open Settings, the location is as shown below

 

Then find the settings of the SDK, the location is as shown below

 

Or you can find it by searching for SDK directly in the search box below. 

 

Then delete all SDKs and choose one or two suitable ones to download again. I downloaded API 34 and API 30.

 

2. Set up build.gradle. The location is as shown below

 

The circled areas are set to the SDK version you downloaded. I used 30

 

3. Set up the Project Structure, the location is as shown below

 

In Modules, first check whether the areas circled in Properties are set to the SDK version you downloaded.

 

Then check whether the target version is also the downloaded SDK

 

 

Summary: After these three steps, my code prompt problem has been solved. There are now all prompts that were not prompted before, and I no longer need to manually type them. If a computer as weird as mine can solve it, your computer will definitely be able to solve it faster.​ 

Guess you like

Origin blog.csdn.net/m0_74861154/article/details/133739515