I recently updated my Android app (see source on Github) to use Android Studio 0.6.0, which required bumping the build-tools to v19.1.0 (from v19.0.1), the Android Gradle plugin to v0.11 (from 0.9), and the Gradle wrapper to 1.12 (from 1.11).
Before the above changes (at this commit), the app was successfully drawing squares on a canvas to show signal strength of GLONASS satellites (see IDs 87 and 88):
After updating my Android tools and launching via Android Studio or gradlew installDebug
, the squares suddenly disappeared (see IDs 77, 87, 88):
The code that draws the square, with a center of (x,y)
, is:
canvas.drawRect(x - SAT_OFFSET, y + SAT_OFFSET, x + SAT_OFFSET, y - SAT_OFFSET, mSatelliteStrokePaint);
(see Github for full class)
The commit with all changes to update to Android Studio 0.6.0 can be seen here.
Why did canvas.drawRect()
suddenly stop working after updating the Android tools?