Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/401.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/csharp-4.0/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 应用程序已安装在设备上,但未显示 嗨,我是android开发新手,写了一个简单的代码来运行一个简单的应用程序。但是当我在模拟器或我的设备上运行它时,控制台窗口显示该应用程序已成功安装,但在我的模拟器或手机上没有打开任何程序。u plz能建议一种可能的解决方法吗。 清单文件 主要活动_Java_Android_Xml_Eclipse_Android Manifest - Fatal编程技术网

Java 应用程序已安装在设备上,但未显示 嗨,我是android开发新手,写了一个简单的代码来运行一个简单的应用程序。但是当我在模拟器或我的设备上运行它时,控制台窗口显示该应用程序已成功安装,但在我的模拟器或手机上没有打开任何程序。u plz能建议一种可能的解决方法吗。 清单文件 主要活动

Java 应用程序已安装在设备上,但未显示 嗨,我是android开发新手,写了一个简单的代码来运行一个简单的应用程序。但是当我在模拟器或我的设备上运行它时,控制台窗口显示该应用程序已成功安装,但在我的模拟器或手机上没有打开任何程序。u plz能建议一种可能的解决方法吗。 清单文件 主要活动,java,android,xml,eclipse,android-manifest,Java,Android,Xml,Eclipse,Android Manifest,您必须将意图过滤器添加到“不在清单中的活动”标记中: <activity android:name=".MainActivity" android:label="@string/title_activity_main"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android

您必须将意图过滤器添加到“不在清单中的活动”标记中:

<activity
    android:name=".MainActivity"
    android:label="@string/title_activity_main">

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

</activity>


Thanx感谢您的回复,我这么做了,但还是一样happening@Shashwat:您是否从清单标签中删除了意图过滤器?@Arash ya我这样做了,但问题仍然是一样的,我编辑了上面的代码以显示我在清单和活动中所做的_main@Shashwat:为什么要将意图过滤器添加到布局文件中,照我说的做,在你的清单文件中,将意图过滤器添加到你的活动标签中。@Arash Thanx很多,它很有效,我可以通过其他方式与你联系,从你那里学到更多东西吗。?
    <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingBottom="@dimen/activity_vertical_margin"
    android:paddingLeft="@dimen/activity_horizontal_margin"
    android:paddingRight="@dimen/activity_horizontal_margin"
    android:paddingTop="@dimen/activity_vertical_margin"
    tools:context="com.example.firstapp.MainActivity" >

   <EditText
    android:id="@+id/editText1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignLeft="@+id/imageView1"
    android:layout_alignParentBottom="true"
    android:layout_marginBottom="26dp"
    android:ems="10"
    android:inputType="numberPassword" />

   <EditText
    android:id="@+id/editText5"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_above="@+id/editText1"
    android:layout_alignLeft="@+id/editText1"
    android:ems="10"
    android:inputType="textMultiLine"
    android:text="Enter your Password"
    tools:ignore="HardcodedText" />

    <EditText
    android:id="@+id/editText3"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_above="@+id/editText5"
    android:layout_alignLeft="@+id/editText5"
    android:layout_marginBottom="20dp"
    android:ems="10"
    android:inputType="textEmailAddress" >

    <requestFocus android:layout_width="wrap_content" />

   </EditText>

   <EditText
    android:id="@+id/editText4"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_above="@+id/editText3"
    android:layout_alignLeft="@+id/editText3"
    android:ems="10"
    android:inputType="textMultiLine"
    android:text="Enter your E-mail id"
    tools:ignore="HardcodedText" />

   <ImageView
    android:id="@+id/imageView1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_above="@+id/editText4"
    android:layout_centerHorizontal="true"
    android:layout_marginBottom="36dp"
    android:src="@drawable/robo" 
    android:contentDescription="@null"/>

   <EditText
    android:id="@+id/editText2"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentTop="true"
    android:layout_centerHorizontal="true"
    android:layout_marginTop="38dp"
    android:ems="10"
    android:inputType="textMultiLine"
    android:text="Welcome To Foodparkk"
    tools:ignore="HardcodedText" />

<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</RelativeLayout>
<activity
    android:name=".MainActivity"
    android:label="@string/title_activity_main">

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

</activity>