1.对包名的判断,异常则说明不存在: 代码如下: try { PackageManager pm = getPackageManager(); pm.getPackageInfo("com.org", PackageManager.GET_ACTIVITIES); } catch (NameNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } 2.对类名的判断,异常则说明不存在: 代码如下: ...
[ 查看全文 ]