Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failed to find: com.android.support:support-v4:21.+

So, everything was working fine not to long ago but when I tried to make a full screen activity in Android Studio, I get 2 errors.

This appears to only be happening with the full screen activity.

  1. Failed to find: com.android.support:support-v4:21.+
  2. Gradle project sync failed. Basic functionality(e.g editing, debugging) will not work correctly.

error images:

http://i.imgur.com/71CQ2zA.png http://i.imgur.com/omoX4mP.png

Build error:

Error:A problem occurred configuring project ':app'.

Could not resolve all dependencies for configuration ':app:_debugCompile'. Could not find com.android.support:support-v4:21.0.0. Searched in the following locations: there was 2 links here but I had to remove them because I don't have enough rep. Required by: MyApplication2:app:unspecified

Things I have tried:

Installing fresh SDK and Android Studio. Installing newer versions of java JDK. (I needed a new one anyway) Google search.

like image 843
Sokaz Avatar asked Feb 12 '23 11:02

Sokaz


1 Answers

Try this:

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:21.0.0'
}

And check if you install Support Library and Support Repository: enter image description here

like image 142
Ismael Di Vita Avatar answered Feb 23 '23 09:02

Ismael Di Vita