Error with android.support.v7.app. How to resolve?

Asked

Viewed 870 times

0

I’ve searched the entire forum and found nothing to solve my problem.

Whenever I create a new project by Eclipse, it accuses an error in the android.support.v7.app.Actionbaractivity library, within the main class. The strange thing is that this error only happens in new projects. In old projects that have already been created, this library works normally.

Follow below my console:

[2014-12-20 12:14:30 - Taskk] Project has no project.properties file! Edit the project properties to set one.
[2014-12-20 12:14:56 - Taskk] Project has no project.properties file! Edit the project properties to set one.
[2014-12-20 12:15:14 - Contactos] Unable to resolve target 'android-8'
[2014-12-20 12:21:37 - Beer] Found 2 versions of android-support-v4.jar in the dependency list,
[2014-12-20 12:21:37 - Beer] but not all the versions are identical (check is based on SHA-1 only at this time).
[2014-12-20 12:21:37 - Beer] All versions of the libraries must be the same at this time.
[2014-12-20 12:21:37 - Beer] Versions found are:
[2014-12-20 12:21:37 - Beer] Path: C:\Users\PC\Documents\Estudy\appcompat_v7\libs\android-support-v4.jar
[2014-12-20 12:21:37 - Beer]    Length: 758727
[2014-12-20 12:21:37 - Beer]    SHA-1: efec67655f6db90757faa37201efcee2a9ec3507
[2014-12-20 12:21:37 - Beer] Path: C:\Users\PC\Documents\Estudy\Project1\libs\android-support-v4.jar
[2014-12-20 12:21:37 - Beer]    Length: 995624
[2014-12-20 12:21:37 - Beer]    SHA-1: 3e4e879d0b3dc11f2feb3f55e77e3b5bd82c4a28
[2014-12-20 12:21:37 - Beer] Jar mismatch! Fix your dependencie

I’ve spent days trying to figure out why that mistake.

  • 1

    Actually the error is saying that there are different versions of the same library (android-support-v4.jar) running. See if removing this . jar from your project’s libs folder helps you.

  • @Thomas I went in the folder of my project and only found one android-support-v4.jar. The strange thing is that it’s not just in a project, but in everyone I create. The old ones, they work normally. Have any other suggestions?

  • 1

    The problem is that it is picking up the android-support-v4.jar from another way hereafter of that 'unique' you found in the libs folder of that project. Remove, clean and build the project.

  • 1

    @Thomas I got it!! Thanks so much for the help. I got it this way: I went to the directory where ALL my projects were, ex: Documents\Study\appcompat_v7\libs and removed the android-support-v4.jar. I was going in the directory of my own project and deleting. So it didn’t matter. Thanks for the help!

  • @Stokes, beware of removing... because if the appcompat v7 has this lib, it is because it ensures that everything it has works in this version (everything that has been done has been tested in this version). I recommend you to catch that lib from appcompat and use it in your projects.

  • @Wakim didn’t understand it very well. So when I go to create a new project, I must copy the android-suppot-v4.jar for the libs of my project? The strange thing is that this problem started when I did a small update. So even excluding that lib from appcompat v7, can there be mistakes in the future? It’s a wrong way?

  • In fact, this mistake is because the two lib’s (the appcompat and those of your projects) are with different versions (different hash’s). If you put all lib’s in the same version, the error will no longer happen. I need to confirm, but I believe it was the update that caused this error, because when updated the versions were different.

  • @Wakim Thanks for the explanation! I get it. So is there any way to "undo" this update? I have important projects that are almost ready, I’m afraid of bugging something in their briefcase. Do you have any idea how I can solve this problem?

  • He even tried to copy the jar of support v4 of appcompat for your projects? The reverse of what you did before. There was some problem?

  • @Wakim Actually, when I create some project, the support v4 is automatically created within the project’s libs folder. It is really necessary to copy and replace it?

Show 5 more comments
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.