Package com.google.android.maps does not exist (IntelliJ)

后端 未结 3 797
失恋的感觉
失恋的感觉 2020-12-14 09:12

I\'ve used the Maps APIs many times before and not had this problem, but I\'ve clearly done something wrong with this IntelliJ project. Under Settings->SDKs I have specified

3条回答
  •  长情又很酷
    2020-12-14 10:13

    So to get the Google (Maps etc) APIs working in IntelliJ:

    1. Under File->Project Structure->SDKs add an item for the platform level you're targetted. Under the classpath tab add a reference to the top of the android SDKs folder, and use the Build Target menu to specify which platform to target.
    2. Under Settings->Project Structure->Modules->Dependencies select the SDK version from the "Module SDK" list
    3. If you need to target the Google (Maps etc) APIs then under Settings->Project Structure->SDKs->Classpath make sure you ALSO add a reference the .jar file for the Google APIs for that platform version (e.g. addons/addon_google_apis_google_inc_8/libs/maps.jar

提交回复
热议问题