Error: as shown in the figure
Some methods in mianactivity will report errors:
At the beginning, I thought that the SDK was faulty, because I always thought that my SDK was not installed properly. Then I repeatedly installed Android studio. Those who included the SDK and didn’t package the SDK came several times, and I repeatedly installed the SDK (this is a sad story) Finally, with the help of Baidu boss, we can solve this problem
Solution:
1. Open build.gradle
2. Replace the release method comment with “repositories {maven {URL” https://maven.google.com “}” is as follows:
3、clean project
The solution effect is as follows: