package android.support.v4.app does not exist ; in Android studio 0.8

前端 未结 12 1618
我在风中等你
我在风中等你 2020-12-01 05:24

I\'ve recently updated the android studio IDE to 0.8 to work with the new android L SDK. To start I imported a finished android project that receives no errors in the older

12条回答
  •  天涯浪人
    2020-12-01 05:25

    tl;dr Remove all unused modules which have a dependency on the support library from your settings.gradle.

    Long version:

    In our case we had declared the support library as a dependency for all of our modules (one app module and multiple library modules) in a common.gradle file which is imported by every module. However there was one library module which wasn't declared as a dependency for any other module and therefore wasn't build. In every few syncs Android Studio would pick that exact module as the one where to look for the support library (that's why it appeared to happen randomly for us). As this module was never used it never got build which in turn caused the jar file not being in the intermediates folder of the module.

    Removing this library module from settings.gradle and syncing again fixed the problem for us.

提交回复
热议问题