在我的應用程序中,我必須使用Intent.setClassName或setComponent在另一個包中啓動一個活動。當我使用Intent.setClass時,沒有任何問題,如 Intent intent = new Intent(getApplicationContext(),org.iustb.knowledebase.animation.transparent.MainTransparentActivity.class); 在網絡上解決這個問題的建議是在AndroidManifest的目標活動中添加或android:exported =「true」,但它不起作用。 有沒有人可以幫助我?
我寫了下面的代碼:目標活動的權限拒絕:啓動意圖
Intent intent = new Intent();
intent.setClassName(cursor.getString(pIndex), cursor.getString(cIndex));
startActivity(intent);
清單文件設置:
<activity android:name="org.iustb.knowledebase.animation.transparent.MainTransparentActivity"
android:exported="true"></activity>
你能不能從後'LogCat',該輸出將幫助我們給你更好的答案。 – 2012-08-13 08:28:02