2017-04-16 8 views
1

私はAndroidスタジオを介して電話でアプリを起動すると、アプリでエラーが表示されます。私の電話のアイコンを使ってアプリケーションを開くと、それは機能します。私はAndroidManifest.xmlの問題だと思います。
P.S.デバイスがLolipopにない場合、デバイスは何も動作しません。私のアプリを起動すると、動かない。しかし、私がアイコンを通してそれを含めると、すべてが動作します

UPD:Google Playでアプリを公開しています。デベロッパーコンソールで、メインアクティビティのエラーonCreateという通知メッセージが届きました。しかし、私はここで何も見つかりませんでした。

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="com.engineers.great.firstapp" 
    > 
    <uses-permission android:name="android.permission.INTERNET"/> 
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> 
    <application 
     android:allowBackup="true" 
     android:icon="@mipmap/icon" 
     android:label="@string/app_name" 
     android:theme="@style/AppTheme"> 

     <!--Below MA which started at first. I can can return here, if I use a back button --> 
     <activity android:name="com.engineers.great.firstapp.MainActivity" 
      android:windowSoftInputMode="adjustResize" 
      android:configChanges="orientation" 
      android:screenOrientation="portrait"> 
      <intent-filter> 
       <category android:name="android.intent.category.LAUNCHER"/> 
       <action android:name="android.intent.action.MAIN"/> 
      </intent-filter> 

     </activity> 
<!-- It's not a main menu lol if you click from MA on "START" then you will be here --> 
     <activity android:name=".MainMenu" 
      android:windowSoftInputMode="adjustResize" 
       android:configChanges="orientation" 
      android:screenOrientation="portrait"> 
      <intent-filter> 
       <category android:name="android.intent.category.DEFAULT" /> 
      </intent-filter> 
      </activity> 
<!-- Below from MA1_! to MA2 are questions and results of my test. I set intent extras in everyone. I don't know, maybe it's important --> 
     <activity android:name=".MainActivity1_1" 
      android:windowSoftInputMode="adjustResize" 
      android:configChanges="orientation" 
      android:screenOrientation="portrait"> 

     </activity> 
     <activity android:name=".MainActivity1_2" 
      android:configChanges="orientation" 
      android:screenOrientation="portrait"> 

     </activity> 
     <activity android:name=".MainActivity1_3" 
      android:configChanges="orientation" 
      android:screenOrientation="portrait"> 
     </activity> 
     <activity android:name=".MainActivity2" 
      android:configChanges="orientation" 
      android:screenOrientation="portrait"> 
     </activity> 

     <!-- It's many buttons with different results of test --> 
     <activity android:name=".Sociotypes" 
      android:configChanges="orientation" 
      android:screenOrientation="portrait"> 

     </activity> 


     <meta-data 
      android:name="com.google.android.gms.version" 
      android:value="@integer/google_play_services_version" /> 
    </application> 

</manifest> 
+1

元の投稿を編集してスタックトレースを含めることはできますか? –

+1

''をすべてのアクティビティに追加する必要はありません。それと 'intent-filter'タグをすべてのアクティビティに対して削除しますが、' .MainMenu'のために残しておきます。クリーンでリビルドして、動作するかどうか確認してください。 – RominaV

+0

@Drew、申し訳ありませんが、スタックトレースは何か分かりません。私は初心者だと理解していると思います... – Anastasia

答えて

1

最初のアクティビティでランチャーインテントフィルタを使用していません。 最初に起動するアクティビティにこれを追加してください。

<intent-filter> 
     <category android:name="android.intent.category.LAUNCHER"/> 
     <action android:name="android.intent.action.MAIN"/> 
    </intent-filter> 
関連する問題