09 November 2016

By default, Android Studio (AS) uses Gradle to build projects. However, due to its fast development nature, gotchas are inevitable with releases and updates.

Gotcha from Upgrading to 2.2.x

There are two issues I encountered when upgrading from 2.1.x to 2.2.x. Simply disable and enable the plugins to fix them. Follow the links for details.

Cannot Resolve Symbols of the Android Support Test Libraryr

This is annoying and happens once in a while you see the JUnit4 symbols from the Android Suppport Test library are not recognized by Android Studio. The quick fix is to run the Gradle task as follows.

$> ./gradlew generateDebugTestSources

Further, follow the link for details on StackOverFlow.

Cannot Resolve Symbols in Dependent Android Library Modules

If you’re using the experimental Gradle plugin, make sure to apply plugin 'com.android.model.library.' Nonethless, it’s less painful to move to the offical CMake based external build.

Last Resorts

File → Invalidate Caches/Restart