私のアプリでは、Intent.setClassNameまたはsetComponentを使用して、別のパッケージでアクティビティを開始する必要があります。Intent intent = new Intent(getApplicationContext()、org.iustb.knowledebase.animation.transparent.MainTransparentActivity.class);のようにIntent.setClassを使用しても問題はありません。Webでこの問題を解決するための提案は、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>