question: public void testMissingMainActivity ( ) throws Exception { mEnabled . add ( LauncherActivityDetector . ISSUE_MORE_THAN_ONE_LAUNCHER ) ; mEnabled . add ( LauncherActivityDetector . ISSUE_MISSING_LAUNCHER ) ; mEnabled . add ( LauncherActivityDetector . ISSUE_LAUNCHER_ACTIVITY_IN_LIBRARY ) ; String expected = "AndroidManifest.xml:4: Warning: Expecting AndroidManifest.xml to have an " + "activity with a launcher intent. [MissingLauncher]\n" + "    <application>\n" + "    ^\n" + "0 errors, 1 warnings\n" ; String result = lintProject ( xml ( FN_ANDROID_MANIFEST_XML , "" + "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + "<manifest package=\"com.example.android.custom-lint-rules\"\n" + "          xmlns:android=\"http://schemas.android.com/apk/res/android\">\n" + "    <application>\n" + "        <activity android:name=\"com.example.android.custom-lint-rules" + ".Activity1\">\n" + "            <intent-filter>\n" + "                <action android:name=\"android.intent.action.VIEW\" />\n" + "\n" + "                <category android:name=\"android.intent.category.HOME\" />\n" + "                <category android:name=\"android.intent.category.LAUNCHER\" />\n" + "                <category android:name=\"android.intent.category.DEFAULT\" />\n" + "                <category android:name=\"android.intent.category.BROWSABLE\" " + "/>\n" + "            </intent-filter>\n" + "        </activity>\n" + "\n" + "        <activity android:name=\"com.example.android.custom-lint-rules" + ".Activity2\">\n" + "        </activity>\n" + "\n" + "        <activity android:name=\"com.example.android.custom-lint-rules" + ".Activity3\">\n" + "            <intent-filter>\n" + "                <action android:name=\"android.intent.action.SEND\"/>\n" + "                <category android:name=\"android.intent.category.DEFAULT\"/>\n" + "                <data android:mimeType=\"text/plain\"/>\n" + "            </intent-filter>\n" + "        </activity>\n" + "    </application>\n" + "</manifest>" ) ) ; assertEquals ( expected , result ) ; }
target:  Test that a manifest without an activity with a launcher intent reports an error.