问题描述
- CTS测试报java.lang.SecurityException
-
java.lang.AssertionError: Failed to successfully run device tests for com.android.cts.net.hostside: Instrumentation run failed due to 'java.lang.SecurityException'
at com.android.cts.net.HostsideNetworkTests.runDeviceTests(HostsideNetworkTests.java:87)
at com.android.cts.net.HostsideNetworkTests.testVpn(HostsideNetworkTests.java:74)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at com.android.tradefed.testtype.DeviceTestResult$1.protect(DeviceTestResult.java:81)
at com.android.tradefed.testtype.DeviceTestResult.runProtected(DeviceTestResult.java:56)
at com.android.tradefed.testtype.DeviceTestResult.run(DeviceTestResult.java:85)
at junit.framework.TestCase.run(TestCase.java:124)
at com.android.tradefed.testtype.DeviceTestCase.run(DeviceTestCase.java:117)
at com.android.cts.tradefed.testtype.JarHostTest$TestRunnable.run(JarHostTest.java:248)
at com.android.tradefed.util.RunUtil$RunnableNotifier.run(RunUtil.java:346)
有谁知道这个要怎么看么?
run cts -c com.android.cts.net.HostsideNetworkTests -m testVpn
在测VPN得时候报的错。
解决方案
权限问题吧,你需要在mainfest文件中加入对应的权限
解决方案二:
java.lang.SecurityException
java.lang.SecurityException
时间: 2025-01-30 13:01:47