muteButton.setOnClickListener {
Runtime.getRuntime().exec("adb shell settings put system csc_pref_camera_forced_shuttersound_key 0");
这是我的代码,下面是日志信息。
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:502)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)
Caused by: java.io.IOException: Cannot run program "adb": error=13, Permission denied
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1050)
at java.lang.Runtime.exec(Runtime.java:698)
at java.lang.Runtime.exec(Runtime.java:528)
at java.lang.Runtime.exec(Runtime.java:425)
at pakage_name.MainActivity.onCreate$lambda-0(MainActivity.kt:16)
at pakage_name.MainActivity.$r8$lambda$ho6D_gaRxTXOpx0ACOxYNLNSY60(Unknown Source:0)
I think
Caused by: java.io.IOException: Cannot run program "adb": error=13, Permission denied