startActivity(new Intent(this, SettingsActivity.class));
4.0 を使用しているユーザーの 1 人に、このエラーのインスタンスが表示されました。
java.lang.SecurityException: Not allowed to start activity Intent { cmp=co.bandicoot.ztrader/.activity.SettingsActivity }
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1675)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1442)
at android.app.Activity.startActivityForResult(Activity.java:3474)
at android.app.Activity.startActivityForResult(Activity.java:3435)
at android.support.v4.app.FragmentActivity.startActivityForResult(SourceFile:839)
at android.app.Activity.startActivity(Activity.java:3677)
at android.app.Activity.startActivity(Activity.java:3645)
at co.bandicoot.ztrader.activity.MainActivity.onOptionsItemSelected(SourceFile:3446)
.....
SettingsActivity のマニフェスト宣言は次のとおりです。
<activity
android:name="co.bandicoot.ztrader.activity.SettingsActivity"
android:label="@string/action_settings"
android:parentActivityName="co.bandicoot.ztrader.activity.MainActivity"
android:screenOrientation="portrait" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="co.bandicoot.ztrader.activity.MainActivity" />
</activity>
何か案は?
編集:これが私の完全なマニフェストです。ここで何か問題がありますか?私は SettingsActivity を見ていますが、追加のアクセス許可が必要な可能性があるものはないようです。
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="co.bandicoot.ztrader"
android:versionCode="110"
android:versionName="3.5.2" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="20" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:largeHeap="true"
android:theme="@style/Theme.Ztraderdarkactionbar" >
<receiver android:name=".TickerAlarm" >
</receiver>
<receiver android:name=".FastAlarm" >
</receiver>
<receiver android:name=".DownloadCurrencyPairsTask" >
</receiver>
<receiver android:name=".AutoStart" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" >
</action>
</intent-filter>
</receiver>
<service android:name="KillNotificationService" >
</service>
<activity
android:name="co.bandicoot.ztrader.activity.MainActivity"
android:configChanges="orientation"
android:label="@string/app_name"
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:uiOptions="splitActionBarWhenNarrow"
android:windowSoftInputMode="stateHidden" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="co.bandicoot.ztrader.activity.CreateKeyActivity"
android:label="@string/create_key"
android:parentActivityName="co.bandicoot.ztrader.activity.MainActivity"
android:screenOrientation="portrait" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="co.bandicoot.ztrader.activity.MainActivity" />
</activity>
<activity
android:name="co.bandicoot.ztrader.activity.HistoryActivity"
android:label="@string/history"
android:parentActivityName="co.bandicoot.ztrader.activity.MainActivity"
android:screenOrientation="portrait" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="co.bandicoot.ztrader.activity.MainActivity" />
</activity>
<activity
android:name="co.bandicoot.ztrader.activity.SettingsActivity"
android:label="@string/action_settings"
android:parentActivityName="co.bandicoot.ztrader.activity.MainActivity"
android:screenOrientation="portrait" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="co.bandicoot.ztrader.activity.MainActivity" />
</activity>
<activity
android:name="co.bandicoot.ztrader.activity.ChartActivity"
android:label="@string/app_name"
android:parentActivityName="co.bandicoot.ztrader.activity.MainActivity"
android:screenOrientation="landscape"
android:theme="@android:style/Theme.Holo.NoActionBar.Fullscreen" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="co.bandicoot.ztrader.activity.MainActivity" />
</activity>
<activity
android:name="co.bandicoot.ztrader.activity.ManagePairsActivity"
android:label="@string/pairs"
android:screenOrientation="portrait" >
</activity>
</application>
</manifest>