Failed to find Platform SDK with path: platforms;android-P

时间:2024-05-18 16:15:16

坑大了!!!接收别人写的代码,clone下来的代码  ,run以后报Failed to find Platform SDK with path: platforms;android-P这样的错误,当时一脸懵逼!!! 最后全局搜索一下  Ctrl+shift+F   android-P ,在build下发现:

// BUILD_SDK_VERSION
    compileSdkVersion = android-P
// BUILD_TOOLS_VERSION
    buildToolsVersion = '28.0.0'

原来是编译版本出了问题。这很明显是一个预览版。修改为:

compileSdkVersion = 28

问题解决了,AS开发版本如下:

Failed to find Platform SDK with path: platforms;android-P