Search code examples
androidandroid-11

How can I get an Android 11 test app to compile


Trying to test an app in Android 11 (API 30), but it won't compile.

Error: Module 'app': platform 'android-30' not found

enter image description here

enter image description here


Solution

  • Replace:

    compileSdkVersion 30
    

    with:

    compileSdkVersion 'android-R'
    

    We will not be able to use 30 until later this year.