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

╄→尐↘猪︶ㄣ 提交于 2019-12-04 01:13:16
moxi

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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!