9

My Android Studio version is 2.1 preview. I'm running my project using Google APIs, Android 17, rev 4 (API 17).

I'm having 1 pop-up error while debugging app.

[Information: Image to show my pop-up errror. Click to show this.][1]

I never met error like this earlier. How can I resolve this?

Updated:

I often meet error like this:

error: diamond operator is not supported in -source 1.6
(use -source 7 or higher to enable diamond operator

I waas trying to do research on this. I tried but it never worked out. When does this error come and how can I resolve it?

Thanks.

cprakashagr
  • 751
  • 11
  • 28
Luna
  • 105
  • 1
  • 1
  • 7

4 Answers4

20

It is not an error. Its just Android Studio trying to figure out what you want to debug. So in your case the "app" module. Have you done a gradle build through? Pushing this: enter image description here. Gradle should set it up so you dont have to choose debug target.

EDIT: This icon is different on Android Studio 3.0, is called "Sync Project with Gradle Files".

miqueloi
  • 688
  • 4
  • 13
7

Open Android Studio preference-> search for "SDK" -> edit Android SDK Location point it to your sdk android folder.

UPDATE

For resolve this error

error: diamond operator is not supported in -source 1.6
(use -source 7 or higher to enable diamond operator

Download jdk 1.7 and open Module Setting -> SDK Location -> edit JDK Location point it to jdk 1.7 home foler.

mr.icetea
  • 2,607
  • 3
  • 24
  • 42
  • sorry, I can't add a new question in 90 minutes. You can look my question update. I usually meet this error but I don't know how to resolve this. Thank you very much. – Luna Mar 11 '16 at 07:58
  • @Luna Open your Module Setting edit JDK location change to use java 1.7 instead of 1.6 – mr.icetea Mar 11 '16 at 08:15
  • You awesome. Thanks for that. – Luna Mar 11 '16 at 09:48
5

Go to

Tools -> Android -> Sync Project with Gradle Files

in Android Studio 3.0.1 to solve the following

Error: Please select Android SDK

as mentioned here

Jose Kj
  • 2,912
  • 2
  • 28
  • 40
4

On new Android Studio; Open app's module settings with right click, Select 'app' from left sidebar, Change 'Compile Sdk Version' na 'Build Tools Version' as whatever your compileSdkVersion & buildToolsVersion are on build.gradle, Click OK, that's it.

Osman Yalın
  • 620
  • 7
  • 7