Eclipse project starts with error

2

When I create a project and the appcompat_v7 is closed the project gets error, but if it is open it does not have problem, it is normal the projects depend on appcompat_v7 ?

    
asked by anonymous 10.07.2015 / 21:14

3 answers

1

Yes, it is normal. It turns out that the appcompat_v7 project has the libraries that the project needs to import to work on older versions of emulators, or rather emulators emulating older versions of Android OS.

But you can remove this dependency. You have to look in the .xml files for this.

As an addendum, change the project name with something specific to easily identify which appcompatv7 is from which project, or add the appcompat project to the list of related projects from which you will develop. It will facilitate to close the unnecessary projects / open the necessary ones.

    
10.07.2015 / 21:19
3

Yes, it is necessary to support older versions of emulators. You can change the SDK to at least 14 or higher, which does not depend on appcompat.

    
10.07.2015 / 21:24
1

DaniloAlbergardi ,

If your project is being developed using the appcompat library, it needs to be assigned to your project. Your image is missing the imports of this library.

What's the use?

These libraries were made available as a support mode for devices that use old versions of Android , we can illustrate a good example of this is in the form of access to SDCARD between versions with ContextCompat.getExternalFilesDirs that can be used in all versions .

To add the appcompat to your project go to:

Properties do seu projeto > Android > Add e coloque o appcompat.
  

Official Documentation

    
10.07.2015 / 21:23