问题描述
- api隐藏函数调用-失败
-
private void removeAndDeleteGroup(WifiP2pGroup wifiP2pGroup) {
mManager.removeGroup(mChannel, null);
try {
Method getNetworkId = WifiP2pGroup.class.getDeclaredMethod("getNetworkId");
Integer networkId = (Integer) getNetworkId.invoke(wifiP2pGroup);
Method deletePersistentGroup = WifiP2pManager.class.getDeclaredMethod("deletePersistentGroup",
WifiP2pManager.Channel.class, Integer.class, WifiP2pManager.ActionListener.class);
deletePersistentGroup.invoke(mManager, mChannel, networkId, null);
} catch (NoSuchMethodException e) {
Log.e("WIFI", "Could not delete persistent group", e);
} catch (InvocationTargetException e) {
Log.e("WIFI", "Could not delete persistent group", e);
} catch (IllegalAccessException e) {
Log.e("WIFI", "Could not delete persistent group", e);
}
}
请问上面程序哪里有问题吗?求教
解决方案
http://www.pudn.com/downloads285/sourcecode/java/javascript/detail1287858.html
解决方案二:
大哥那一句失败了啊,看异常信息啊。
时间: 2025-01-21 12:13:00