when creating a new android application project..a by default activity should be created in my "src" folder .. but when i created new project there is no any default activity... i have chose "blank activity " too.. what can i do for this ?? and its compulsory that a by default activity must be created according to this official site: http://developer.android.com/training/basics/firstapp/building-ui.html please help
Create a new class that extends Activity.
In your manifest file add
<activity
android:name=".activities.MyActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Make sure the android:name
field is correct for your application. For me MyActivity
is the name of my activity and activities
is a subpackage. From here on you can start like normally.
If you still have problems, you can just look for an example and copy the file.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.