Let me answer this, it’s the first time I encountered this pitfall. It bothered me for a long time. . . . . The problem was solved like this. Studio reminded me to upgrade the SDK, and then upgraded, and the error was solved. I don’t understand the specific principle. I hope someone can explain it. There is another method, which a master told me: just run Android studio as an administrator. This problem can also be solved.
Then I would like to explain again, when opening andriod studio, do not open Kugou Music. MD occupies the port. I have fallen into this pit several times. In the end, I answered a little bit wrongly. Please forgive me. . . . .
Let me answer this, it’s the first time I encountered this pitfall. It bothered me for a long time. . . . .
The problem was solved like this. Studio reminded me to upgrade the SDK, and then upgraded, and the error was solved. I don’t understand the specific principle. I hope someone can explain it.
There is another method, which a master told me: just run Android studio as an administrator. This problem can also be solved.
Then I would like to explain again, when opening andriod studio, do not open Kugou Music. MD occupies the port. I have fallen into this pit several times. In the end, I answered a little bit wrongly. Please forgive me. . . . .
Is this file Androidsdktoolsandroid.bat wrong? You can open the directory and take a look.
The java sdk is not installed or the environment variables of the sdk are not set correctly
Enter settings and see if your sdk location is set correctly