Set the android startup interface in the androidmanifest. xml file

Source: Internet
Author: User

I collected a bunch of Android code from the Internet, such as the login program of Android and the helloworld program of Android, but I still cannot run a correct program correctly. I 've been depressed for a long time, finally, after a test, the program of the self-built project was successfully run in the android simulator. The following is a summary of the procedure startup interface settings:

In the android project created by myeclipse, find the androidmanifest. xml file and double-click it.

After setting the program running, start the androidmanifest. xml file on the login interface as follows:

<? XML version = "1.0" encoding = "UTF-8"?>
<Manifest xmlns: Android = "http://schemas.android.com/apk/res/android"
Package = "com. GP. aciti.pdf"
Android: versioncode = "1"
Android: versionname = "1.0" type = "codeph" text = "/codeph">
<! -- Set the android SDK version running in the simulator -->
<Uses-SDK Android: minsdkversion = "8" Android: targetsdkversion = "18"/>
<! -- Get network operation permissions -->
<Uses-Permission Android: Name = "android. Permission. change_newwork_state"/>
<! -- Android running settings -->
<Application
Android: allowbackup = "true"
Android: icon = "@ drawable/ic_launcher"
Android: Label = "@ string/app_name"
Android: theme = "@ style/apptheme">
<! -- Start the login interface settings for online collection and sorting -->
<Activity
Android: Name = "com. GP. acitivity. loginactivity">
<! -- Set the program to be started first. Copy the following code to the specified position for the activity to be started -->
<Intent-filter>
<Action Android: Name = "android. Intent. Action. Main"/>
<Category Android: Name = "android. Intent. Category. launcher"/>
</Intent-filter>
</Activity>
<! -- Start the helloworld interface settings for online collection and sorting -->
<Activity
Android: Name = "com. GP. acitivity. hellowoldactivity">
</Activity>
</Application>
</Manifest>

After setting the program running, start the androidmanifest. xml file on the helloworld interface as follows:

<? XML version = "1.0" encoding = "UTF-8"?>
<Manifest xmlns: Android = "http://schemas.android.com/apk/res/android"
Package = "com. GP. aciti.pdf"
Android: versioncode = "1"
Android: versionname = "1.0" type = "codeph" text = "/codeph">
<! -- Set the android SDK version running in the simulator -->
<Uses-SDK Android: minsdkversion = "8" Android: targetsdkversion = "18"/>
<! -- Get network operation permissions -->
<Uses-Permission Android: Name = "android. Permission. change_newwork_state"/>
<! -- Android running settings -->
<Application
Android: allowbackup = "true"
Android: icon = "@ drawable/ic_launcher"
Android: Label = "@ string/app_name"
Android: theme = "@ style/apptheme">
<! -- Start the login interface settings for online collection and sorting -->
<Activity
Android: Name = "com. GP. acitivity. loginactivity">
</Activity>
<! -- Start the helloworld interface settings for online collection and sorting -->
<Activity
Android: Name = "com. GP. acitivity. hellowoldactivity">
<! -- Set the program to be started first. Copy the following code to the specified position for the activity to be started -->
<Intent-filter>
<Action Android: Name = "android. Intent. Action. Main"/>
<Category Android: Name = "android. Intent. Category. launcher"/>
</Intent-filter>
</Activity>
</Application>
</Manifest>

System Android Simulator Interface

Start the login interface

Start the helloworld Interface

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.