cts测试后结果中有几个fail项,
-- testCameraFeatures java.lang.NullPointerException at android.app.cts.SystemFeaturesTest.checkRearCamera(SystemFeaturesTest.java:148)
-- testLiveWallpaperFeaturejunit.framework.AssertionFailedError: PackageManager#hasSystemFeature should return true for android.software.live_wallpaper at android.app.cts.SystemFeaturesTest.assertAvailable(SystemFeaturesTest.java:355)-- testNfcFeaturesjava.lang.NoSuchMethodError: android.nfc.NfcAdapter.getDefaultAdapter at android.app.cts.SystemFeaturesTest.testNfcFeatures(SystemFeaturesTest.java:199) -- testSensorFeaturesjunit.framework.AssertionFailedError: PackageManager#hasSystemFeature(android.hardware.sensor.compass) returns true but SensorManager#getSensorList(2) shows sensors [] expected:<true> but was:<false> at android.app.cts.SystemFeaturesTest.assertFeatureForSensor(SystemFeaturesTest.java:295) -- testTelephonyFeaturesjunit.framework.AssertionFailedError: PackageManager#hasSystemFeature should NOT return true for android.hardware.telephony at android.app.cts.SystemFeaturesTest.assertNotAvailable(SystemFeaturesTest.java:362)求高手详细指点pass的方法,非常感谢!!
-- testCameraFeatures java.lang.NullPointerException at android.app.cts.SystemFeaturesTest.checkRearCamera(SystemFeaturesTest.java:148)
-- testLiveWallpaperFeaturejunit.framework.AssertionFailedError: PackageManager#hasSystemFeature should return true for android.software.live_wallpaper at android.app.cts.SystemFeaturesTest.assertAvailable(SystemFeaturesTest.java:355)-- testNfcFeaturesjava.lang.NoSuchMethodError: android.nfc.NfcAdapter.getDefaultAdapter at android.app.cts.SystemFeaturesTest.testNfcFeatures(SystemFeaturesTest.java:199) -- testSensorFeaturesjunit.framework.AssertionFailedError: PackageManager#hasSystemFeature(android.hardware.sensor.compass) returns true but SensorManager#getSensorList(2) shows sensors [] expected:<true> but was:<false> at android.app.cts.SystemFeaturesTest.assertFeatureForSensor(SystemFeaturesTest.java:295) -- testTelephonyFeaturesjunit.framework.AssertionFailedError: PackageManager#hasSystemFeature should NOT return true for android.hardware.telephony at android.app.cts.SystemFeaturesTest.assertNotAvailable(SystemFeaturesTest.java:362)求高手详细指点pass的方法,非常感谢!!
android在/system/etc/permissions下放了很多的xml文件来定义系统的一些特性,你现在应该是这些文件的定义不对.
这些xml文件定义在framework/base/data/etc,你挑选需要的xml copy过去就行了,每个xml都有说明的。
junit.framework.AssertionFailedError at android.hardware.cts.CameraTest.checkFocusDistances(CameraTest.java:1246)
---------------------
我曾在system.img中删除相关的配置项,比如:/system/etc/permissions中的,没有copy android.hardware.camera.autofocus.xml和android.hardware.camera.flash-autofocus.xml,这样,就不会在cts的feature list中勾中这两个选项,但是,测试时,还是会测试autofocus相关内容,为什么呢?
去看下代码就明白了。
你的camera的默认参数中设置了能够支持focusmode的值,所以cts才会去测试你的focusmode。你修改下你的默认参数就行了。
java.lang.Error: java.net.UnknownHostException: www.intel.com at org.apache.harmony.security.tests.java.security.CodeSourceTest.init(CodeSourceTest.java:113)
这是什么原因啊?
为什么我找不到/system/etc/permissions这个文件夹呢?这个路径是在哪?
framework/base/data/etc 在source code 中。