今天看到這么一道題,但是怎么查API幫助文檔、百度,都沒有答案,用Eclipse看了一下,即使僅僅導入android.app.*,android.os.*都可以用,但是android.app.getPackageManager(),android.content.getPackageMagager(),android.content.pm.PackageManager.getPackageManager(),……都沒用,請問這個屬于什么類?還是不屬于特定的類,只是用于獲取android.content.pm.PackageManager這個類用的?求解答但是,如果寫一句android.content.pm.PackageManager.getApplicationInfo(packageName,android.content.pm.PackageManager.GET_UNISTALLED_PACKAGES);的話,又會提示什么沒有這個方法,但是在API文檔里面寫的很明確啊。
2 回答

哈士奇WWW
TA貢獻1799條經驗 獲得超6個贊
getPackageManager()方法屬于ContextWrapper類,該類繼承自Context類
/** * Proxying implementation of Context that simply delegates all of its calls to * another Context. Can be subclassed to modify behavior without changing * the original Context. */ public class ContextWrapper extends Context |
- 2 回答
- 0 關注
- 429 瀏覽
添加回答
舉報
0/150
提交
取消