当有:[INSTALL_FAILED_OLDER_SDK] 错误的时候, 修改配置文件build\core\version_defaults.mk
1. ifeq "" "$(DEFAULT_APP_TARGET_SDK)" 2. # This is the default minSdkVersion and targetSdkVersion to use for 3. # all .apks created by the build system. It can be overridden by explicitly 4. # setting these in the .apk's AndroidManifest.xml. It is either the code 5. # name of the development build or, if this is a release build, the official 6. # SDK version of this release. 7. ifeq "REL" "$(PLATFORM_VERSION_CODENAME)" 8. DEFAULT_APP_TARGET_SDK := $(PLATFORM_SDK_VERSION)-------改成----->DEFAULT_APP_TARGET_SDK := 9或8或7..... 9. else 10. DEFAULT_APP_TARGET_SDK := $(PLATFORM_VERSION_CODENAME)-------改成-------> DEFAULT_APP_TARGET_SDK := 9或8或7...... 11. endif 12. endif再重新make cts
当需要自己写一个cts的测试用例
1. 首先写一个测试用例,
①.模仿android/cts/tests/tests/example 这个测试用例写一个. 如/android/cts/tests/tests/myExample
②.修改Android.mk:在myExample目录下面
1. # Replace "Example" with your name. 2. LOCAL_PACKAGE_NAME := MyExampleTestCases
# CTS_COVERAGE_TEST_CASE_LIST := # ....
1. / 2. CTSMyExampleTestCases
重新make cts.就可以使用自己的测试用例了..