android - Unexpected error while executing: -- Error while Launching activity -
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.example.vaibhav.myapplication"> <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" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity> </application> </manifest> ...........................................................................
above code , looks fine don't know why getting below error ...
unexpected error while executing: start -n "com.example.vaibhav.myapplication/com.example.vaibhav.myapplication.mainactivity" -a android.intent.action.main -c android.intent.category.launcher error while launching activity
................. 1 thing , , am start command taking package name twice though declared correctly in
am start -n "com.example.vaibhav.myapplication/com.example.vaibhav.myapplication.mainactivity" -a android.intent.action.main -c android.intent.category
you should use classified class name activity in androidmanifest.xml.
android:name
the name of class implements activity, subclass of activity. attribute value should qualified class name (such as, "com.example.project.extracurricularactivity"). however, shorthand, if first character of name period (for example, ".extracurricularactivity"), appended package name specified in element.
for more info refer android developer site
Comments
Post a Comment