2016-11-07 5 views
5

होना चाहिए, मैं अपने आवेदन को लॉन्च नहीं कर सकता। यह मुझे इस तरह की एक त्रुटि देता है: "दूसरी गतिविधि चलाने में त्रुटि: गतिविधि को निर्यात किया जाना चाहिए या एक इरादा फ़िल्टर होना चाहिए"।दूसरी गतिविधि चलाने में त्रुटि: गतिविधि को निर्यात किया जाना चाहिए या एक इरादा-फ़िल्टर

क्या मेरे मैनिफेस्ट में कुछ गड़बड़ है?

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="sg.edu.rp.g913.mymakeuppouch"> 


    <application 
     android:allowBackup="true" 
     android:icon="@mipmap/ic_launcher" 
     android:label="@string/app_name" 
     android:supportsRtl="true" 
     android:theme="@style/AppTheme"> 
     <activity android:name=".MainActivity"> 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 

       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
     </activity> 
     <activity android:name=".secondActivity"> 
     </activity> 
    </application> 

</manifest> 
+0

http://stackoverflow.com/a/11551693/3395198 –

+0

धन्यवाद, यह पहले से ही काम कर गया लांचर गतिविधि के रूप में चलाने के लिए MainActivity –

उत्तर

17

<activity> टैग

<activity android:name=".secondActivity" 
    android:exported="true"> 
+1

धन्यवाद, यह पहले से ही काम कर रहा है –

3

आप चलाने के लिए सेट करना चाहिए> वांछित लांचर गतिविधि के विन्यास संपादित करें और

नीचे सही गतिविधि के लिए प्रकट में लक्ष्य फ़िल्टर देने में android:exported="true" रखो त्रुटि बनाने की स्थिति

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

     <intent-filter> 
      <action android:name="android.intent.action.MAIN" /> 

      <category android:name="android.intent.category.LAUNCHER" /> 
     </intent-filter> 

    </activity> 
    <activity android:name=".Page_2"> 
    </activity> 
</application> 

Image showing incorrect configuration

सही विन्यास और कोड नीचे दिए गए हैं

<application 
     android:allowBackup="true" 
     android:icon="@mipmap/ic_launcher" 
     android:label="@string/app_name" 
     android:supportsRtl="true" 
     android:theme="@style/AppTheme"> 
     <activity android:name=".MainActivity"> 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 

       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
     </activity> 
     <activity android:name=".Page_2"> 
     </activity> 
    </application> 

corrected configuration window

संबंधित मुद्दे