2017-08-12 12 views
0

私のプログラムはAndroidスタジオで次のエラーを表示しています。アプリ実行中の属性 'parentActivityName`はAPIレベル16以上でのみ使用されます(現在の最小値は15です)

午後12時28分エラー:デフォルトの活動は

が見つかりませんが、私はこの問題は、AndroidManifest.xmlを

`

<application 
     android:allowBackup="true" 
     android:icon="@mipmap/ic_launcher" 
     android:label="@string/app_name" 
     android:roundIcon="@mipmap/ic_launcher_round" 
     android:supportsRtl="true" 
     android:theme="@style/AppTheme"> 
     <activity android:name=".DisplayMessageActivity" 
      android:parentActivityName=".MainActivity"> 
     </activity> 
    </application> 
</manifest> 

` に誰も私を助けてくださいすることができていると思いますか?

+0

もし役に立ちましたら回答に同意してください! –

答えて

1

デフォルトの活動は、あなたのアプリケーションは、ホーム画面で発売される何<activity>を持っていない

が見つかりません。唯一のAPIレベル16で使用され、より高いjust means that yourアンドロイド(現在分15)である

  • 項目parentActivityName:また

    <activity android:name="MainActivity"> 
        <!-- This activity is the main entry, should appear in app launcher --> 
        <intent-filter> 
         <action android:name="android.intent.action.MAIN" /> 
         <category android:name="android.intent.category.LAUNCHER" /> 
        </intent-filter> 
    </activity> 
    

    :それは、次のような適当な<intent-filter>を有することが必要であろうparentActivityName`を属性は、サポートしている一部のデバイスには影響しません。

  • ただし、android:parentActivityNameは存在しないアクティビティ(MainActivity)を指しています。あなたのマニフェスト

+0

ありがとうございます。それは問題を修正しました! – Iain

関連する問題