First, Introduction
In Android development, in order to use the new features of the high-version API, additional packages need to be added to use these new features, which is the Android support package
Second, classification
- Android Support V4: This package is designed to take care of Android version 1.6 and above , which is used by default in development.
- Android Support V7: This package is designed to take care of Android version 2.1 and above , but it is not compatible with low-version Android, and if 1.6 is not considered in development, this package can be used. It is also important to note that the V7 package is dependent on the V4 package, that is, the introduction of V7 package, the same time to introduce V4 package
- Android Support V13: This package is designed to take care of Android version 3.2 and above , and will not be used in general development, and tablet development may use
Iii. Additional Questions1, view the source code of V4 package
In most development, the development tool will automatically introduce V4.jar into the project, but cannot view the V4.jar source
Solution:
Add the jar package from the directory in the SDK /extras/android/support/v4
to the project and introduce the source code.
2. Automatic generation of APPCOMPAT_V7 Library project error in Eclipse development
In the above mentioned V7 package is to take care of Android 2.1 and later, so that it can use the new features of high API
Let's say the Minimum SDK (Minimum Required SDK) chose the following when you created the project in Eclipse, api14
and the compiled version (Compile SDK) also chose a higher api14
version, in order to use the new feature, Eclipse will automatically create the app COMPAT_V7 the library project and referencing it to the project
Many beginners are prone to errors at this time, and eclipse cannot find resources because the target SDK is lower than the highest version in the SDK environment (the highest version of the SDK you download yourself)
Solution:
Scenario One: Set the target SDK to the highest downloaded version, and the APPCOMPAT_V7 Library project will still be created automatically and referenced to the project, but no more errors
Scenario Two: Set the minimum SDK (Minimum Required SDK) to a higher api14
version. At this point, Eclipse does not create the APPCOMPAT_V7 library project because api14
the Android version above does not need to rely on the library project to use the new features.
80, Android Support V4, V7, V13 differences and application scenarios