2

When I tried to launch the project in the tango tutorial, a mistake pops out like this. Where should I look into to fix this problem?

Info shown on Android:

enter image description here

DimaSan
  • 12,264
  • 11
  • 65
  • 75
Daniel
  • 31
  • 1
  • 1
  • 2

5 Answers5

6

As mentioned above, this indeed is a compatibility issue with Android Studio 2.2. A workaround is to set both targetSdkVersion and compileSdkVersion to 22.

xuguo
  • 1,816
  • 1
  • 11
  • 15
4

This seems to be an incompatibility between the current version of the samples and android gradle plug-in version 2.2.1, which is the one that Android Studio kindly offers to upgrade the project to when you import it.

Could you please try downgrading to android gradle plug-in version from to 2.1.2 or 2.1.3 and try again? You do this by editing build.gradle at the root of the project.

Great credit for this finding to Iker who worked through a million tests until finding this out.

Julian Cerruti
  • 1,918
  • 2
  • 16
  • 16
  • I would add that this is due to selecting to upgrade the gradle plugin when opening the project. I would recommend not to do it as a general rule for now on (or for other projects in the cexamples from Tango). I know I won't :) Thanks Julian. – Iker Jamardo Zugaza Oct 14 '16 at 19:55
  • +1 As you said @Julian Cerruti, I update to 2.2.2 and I got this error. Doing the downgrading everything works – Alfaplus Oct 24 '16 at 08:53
1

Change you build.gradle file; set high version.

Example:

android {
    compileSdkVersion 21
    buildToolsVersion '25.0.2'
Pang
  • 9,564
  • 146
  • 81
  • 122
0

Someone said you should delete the .gradle doc at the root directory, but it didn't work for me. Then I checked my gradle doc,and found the minSdkVersion was too low, so I changed it to 19, and high to 25, and compile to 25, then the problem was solved.

I think the cause of this problem is the current NDK Version does not match the Current SDK Version.

Nathan Tuggy
  • 2,237
  • 27
  • 30
  • 38
0

And the other problem maybe that you add "~.intent.action.category.HOME" in the manifest.xml file. I meet this and now solved it by remove it.