0

I am adding support library to my project. I have added android-support-v7-appcompat.But when I added that in my project Its showing Found 2 versions of android-support-v4.jar in the dependency list appcompat in android error then I deleted android-support-v4 and add library in my project. Now I dont having any errors in my code. But when I try to run my project its showing some errors in project. But not showing in logcat or package explorer. Why this happen?

John R
  • 2,078
  • 8
  • 35
  • 58
  • There were two versions of the support library in your workspace, use the same one everywhere. – RED_ Jan 30 '14 at 09:15

1 Answers1

1

Copy the support library from

android-sdk/extras/android/support/v4-android-support-v4.jar

and add it to libs folder of AppCompat and android project. Make sure you have updated support library. Remove the old ones. Clean and build the project.

Raghunandan
  • 132,755
  • 26
  • 225
  • 256
  • when i run my project its show android library projects cannot be launched. – John R Jan 30 '14 at 09:21
  • @JohnR remove it and copy the latest one to the libs folder. THe version that your project has and the appcompat has do not match. makes sure you have the same version for both – Raghunandan Jan 30 '14 at 09:21
  • I have done exactly same as you suggest in your answer but when i run my project its show android library projects cannot be launched. – John R Jan 30 '14 at 09:26
  • @JohnR you need to launch your android project. not your library project. makes sense!. read about it in the docs – Raghunandan Jan 30 '14 at 09:27
  • @JohnR read this. all there in the docs http://developer.android.com/tools/projects/index.html – Raghunandan Jan 30 '14 at 09:28
  • I am running my project not AppCompat. – John R Jan 30 '14 at 09:29
  • seems you made your project a library project then. right click on your project. goto properties android. see if is library is checked. If so uncheck for your project. – Raghunandan Jan 30 '14 at 09:31
  • I am following links in this link. http://developer.android.com/tools/support-library/setup.html – John R Jan 30 '14 at 09:31
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/46412/discussion-between-raghunandan-and-john-r) – Raghunandan Jan 30 '14 at 09:32
  • @JohnR http://stackoverflow.com/questions/15804261/unable-to-resolve-target-android-15/15804314#15804314. pls post a new question for a new problem – Raghunandan Jan 30 '14 at 10:46