error: ‘;’ expected

I just had a frustrating configuration hunt. I was creating an Espresso test-file for a new app I’m making, and after writing just the tiniest bit of boilerplate I wanted to verify everything was working properly, ran the Gradle connectedAndroidTest configuration and got the below…

error: type annotations are not supported in -source 1.7
(use -source 8 or higher to enable type annotations)

Here’s what I was looking at…

Here's what I was looking at...

(Apologies for all the redaction, it makes me feel special  =)

So first I examine which SDK I was using, so I could change it from 1.7 to use 1.8, however…

lulwhut

So I was perplexed, onto the mighty Google… for an hour and I was finding nothing relevant – no one seemed to have this problem, which is always a daunting discovery.  So I begin strolling through all the nooks and crannies of Android Studio, seeing what my elf-eyes could see, and by accident I moved the scroll bar in the coding pane…

snip3

And face-palmed.

Looking at it now, I can kinda argue as to why the error was reported where it was.  It *feels* like it makes sense the problem was reported where it was now that I see the error, but at the time it never seemed plausible that an error could present itself like that just from the absence of a semicolon.  Occam’s razor I guess?

This is also a great excuse to buy another monitor.

Leave a Reply

Your email address will not be published.

Post Navigation