2

I downloaded AS without SDK, installed it in the 64-bit directory, while I already have Android SDK and NDK tools previously installed (they're on the 32-bit directory somehow).

I would like to know how to properly set it up, I'm asking this because I'm prompted to install the SDK tools, and I also get a failed to resolve support library error, but from AS settings I can see that AS recognizes the SDK already installed, is there anything I have to make sure of?

I started an empty project that has some dependencies:

dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.+' compile 'com.android.support:design:23.+' }

Then I get this: Error:(24, 13) Failed to resolve: com.android.support:appcompat-v7:23.+ And this: Error:(25, 13) Failed to resolve: com.android.support:design:23.+

Marcin Orlowski
  • 72,056
  • 11
  • 123
  • 141
Sami Ben
  • 536
  • 7
  • 22
  • Have you tried Tools>Android>SDK Manager>Android SDK Location: and point it in the correct directory? Do you have any more details on failed to resolve support library? Like where does it say that – Script Kitty May 08 '16 at 21:17
  • @ScriptKitty See the edited post above. – Sami Ben May 08 '16 at 21:41
  • @ScriptKitty And the Tools>Android>SDK Manager>Android SDK Location detects my installed SDK just right, it just complains about whitespace in the location path. – Sami Ben May 08 '16 at 21:47
  • No I don't think your problem has to do with SDK. Appcompat v7 is a way to get new features onto older targets. You either didn't install it with SDK manager or your syntax is wrong give me a second – Script Kitty May 08 '16 at 23:04
  • Hm it looks like your syntax is right I would recommend putting in a specific version number like `com.android.support:appcompat-v7:23.3.0`. You have to install the correct package so go to tools>Android>SDK manager>launchstandalonesdkmanager button at the bottom>install packages (the ones that you target, which is API 23). This installs the latest version of the SDK – Script Kitty May 08 '16 at 23:12
  • @ScriptKitty I have already API 23 installed, but I don't know much about Android support libraries, I see `Android Support Repository v30` not installed in the Extras section, should I download it? – Sami Ben May 09 '16 at 10:33
  • Perhaps. Go ahead and download it. I'll be honest, when I used the support package I didn't think twice because I had installed all packages in API 23 and 22. – Script Kitty May 09 '16 at 17:00
  • See this http://stackoverflow.com/questions/32062460/android-appcompat-v723 – Script Kitty May 09 '16 at 17:04
  • @ScriptKitty I solved using the instruction in my answer, thanks. – Sami Ben May 09 '16 at 21:11

1 Answers1

0

I moved my SDK folders to D:/ to get rid of whitespace in the path, then I downloaded Android Support Repository v30, that solved all my problems, thanks for helping.

Sami Ben
  • 536
  • 7
  • 22