Failed to set up SDK: Error:Module 'app': platform 'Google Inc.:Google APIs:21' not found

前端 未结 4 1034
借酒劲吻你
借酒劲吻你 2021-02-14 12:52
Failed to set up SDK: Error:Module \'app\': platform \'Google Inc.:Google APIs:21\' not found.

At a complete loss as to why this isn\'t working. Attemp

4条回答
  •  情歌与酒
    2021-02-14 13:09

    When it failed for me I downloaded Google API's, just as @Daniel Segato explains, which is the right thing to do, and still I got the message once and again and again.

    Until I did this. I opened the module's settings (Ctrl + Alt + Shift + S or File > Project Structure) and, for my module, I changed the Compile Sdk Version option to any other from the list. I resynchornized gradle and then changed the option back to Google APIs (API 23). And then it worked! It's really really really nasty of Android Studio not to recognize the SDK until you change it in that dialog box. But this only happened to me once. Other times it was enough just to download the proper Google API and there you go! But this is nasty.

提交回复
热议问题