Unable to resolve imports from external dependencies in Android Studio 2.0 Preview 5 + Preview 6

前端 未结 1 1309
半阙折子戏
半阙折子戏 2021-02-19 20:33

After upgrading from the last Android Studio 2.0 preview to Preview 5 I\'m having trouble with the imports from the android.support.weara

1条回答
  •  死守一世寂寞
    2021-02-19 21:24

    I had this problem even before with AS 1.5, the easiest way for me to fix it was to use the Terminal inside Android Studio and execute:

    ./gradlew assembleDebug
    

    This will work if you're not using flavors if not just use the name of the flavor, for e.g:

    ./gradlew assembleFlavorNameDebug
    

    that should work too as a workaround without leaving your current instance of AS, and then the compiler recognizes your imports if everything is setup properly.

    For more references please look: http://tools.android.com/build/gradleplugin https://stackoverflow.com/a/21307568/799162

    0 讨论(0)
提交回复
热议问题