Monday, June 6, 2016

Android studio upgrade to 2.1 broke my project

I decided to try out the new (and still in beta) Android studio 2.1 today. Easy peasy as usuall, just download and unzip and run studio.sh and everything starts up.

I suspected that it would not be as easy thou. I spend a lot of time (hobbytime) with bugs and issues in Android studio, the SDK management and the emulator. No changes in the dev environment comes without pain. And sure enough, I got a question about updating the gradle build files which probably broke the project.

I started getting some weird compilation errors regarding the appcompat style definitions.

Error retrieving parent for item: 
No resource found that matches the given name "Theme.AppCompat.Light.NoActionBar".

Google didn't help me much and I started trying to fix things. I spent maybe an hour trying to figure it out before I turned to source control. Which I should have done right away. Checking the git diff was all I needed. There, right before my eyes Android studio had simply washed away my project dependencies. This list was empty!

I took it all back. The only change I let Android studio have was the updated gradle version. That's it. And it was all that was needed. It works now, enough bleeding on the edge today.

No comments:

Post a Comment