Unable to find Default Activity Class Name - java

I am working the process of linking facebook login to my android application. In some tutorial I was asked to register my app with Facebook Developers website where I did everything but I couldnt find "Default Activity Class Name" in my Android Studio I have provided this below manifest file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="in.evago.evago">
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id" />
<!-- Front Page -->
<activity
android:name=".Frontpage"
android:label="#string/app_name"
android:theme="#style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data
android:name="android.app.searchable"
android:resource="#xml/searchable" />
</activity>
<!-- Search results activity -->
<activity
android:name=".SearchResultsActivity"
android:label="#string/title_activity_searchable"
android:launchMode="singleTop"
android:theme="#style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
</intent-filter>
</activity>
<!-- Search results activity Ends -->
</application>
Please help me in locating the "Default Activity Class Name"

should be the class containing:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
So its .Frontpage

Frontpage - This is the default activity name because its the launcher activity

Related

I have warning "App is not indexable by Google Search; consider adding at least one Activity with an ACTION-VIEW intent filter. "

After the update, the following warning appeared in the studio:
“App is not indexable by Google Search; consider adding ACTION-VIEW intent filter. See issue explanation for more details. more ... (Ctrl + F1) »
How to fix it?
My Api is 28.
Here is my manifests:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.omen.serverforcofe" >
<uses-permission android:name="android.permission.NFC"/>
<uses-feature android:name="android.hardware.nfc" android:required="true" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme"
>
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:launchMode="singleTop">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain"
/>
</intent-filter>
</activity>
</application>
</manifest>
<activity
android:name=".MyActivity"
android:screenOrientation="portrait"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
</intent-filter>
</activity>
Adding this intent filter to one of the activities declared in app manifest fixed this for me.

Android - Default Activity Cannot Be Found

I am making a basic custom launcher by following the given instructions on a site... The instructions say that the app can be launched, but when I try, I get an error saying the default activity not found.
I looked into the existing questions on stack overflow but none of them helped me. My manifest is this...
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="omg_its_azzler.launcher">
<activty>
<application android:allowBackup="true"
android:name="omg_its_azzler.launcher.HomeActivity"
android:label="#string/app_name"
android:icon="#mipmap/ic_launcher"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#android:style/Theme.Wallpaper.NoTitleBar.Fullscreen"
android:launchMode="singleTask"
android:stateNotNeeded="true"/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.HOME"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activty>
<activity>
android:name="omg_its_azzler.launcher.AppsActivity"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen">
</activity>
</manifest>
You got the syntax of the manifest wrong. The application tag is the tag you keep all the activities inside of.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="omg_its_azzler.launcher">
<application android:allowBackup="true"
android:name="omg_its_azzler.launcher.HomeActivity"
android:label="#string/app_name"
android:icon="#mipmap/ic_launcher"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#android:style/Theme.Wallpaper.NoTitleBar.Fullscreen"
android:launchMode="singleTask"
android:stateNotNeeded="true"/>
<activity>
android:name="omg_its_azzler.launcher.AppsActivity"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.HOME"/>
<category android:name="android.intent.category.DEFAULT"/>
</intent-filter>
</activity>
</application>
The application tag is the root tag for all activities, and the intent filter goes inside the activity tag
All <activity>...</activity> should be in <application>...</application>.
In your manifest your <activity> tag is outside the <application>...</application> and closing tag </activity> is inside it.
This is the AndroidManifest.xml structure:
<uses-permission />
<permission />
<permission-tree />
<permission-group />
<instrumentation />
<uses-sdk />
<uses-configuration />
<uses-feature />
<supports-screens />
<compatible-screens />
<supports-gl-texture />
<application>
<activity>
<intent-filter>
<action />
<category />
<data />
</intent-filter>
<meta-data />
</activity>
<activity-alias>
<intent-filter> . . . </intent-filter>
<meta-data />
</activity-alias>
<service>
<intent-filter> . . . </intent-filter>
<meta-data/>
</service>
<receiver>
<intent-filter> . . . </intent-filter>
<meta-data />
</receiver>
<provider>
<grant-uri-permission />
<meta-data />
<path-permission />
</provider>
<uses-library />
</application>

no resource identifier found for attribute 'launchmode' in package android

This is my AndroidManifiest.xml File
Their is 2 error
no resource identifier found for attribute 'launchmode' in package android
no resource identifier found for attribute 'stateNotNeeded' in package android
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="a52.puri.fbkunal.com.launcher">
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#android:style/Theme.Wallpaper.NoTitleBar.Fullscreen"
android:launchMode="singleTask"
android:stateNotNeeded="true"
android:
>
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.HOME" />
</intent-filter>
</activity>
</application>
</manifest>
You are assigning unknown property for application tag, launchMode in android is for Activities. Activities launch and visible to user but Application launch only once when you start your App. You can say Application is a start point in Android App.
Assign a launchMode into Activity not in application tag.
Basically we could assign a launchMode directly as an attribute of <activity> tag inside AndroidManifest.xml file list this:
<activity
android:name=".SingleTaskActivity"
android:label="singleTask launchMode"
android:launchMode="singleTask">

android app doesnt crash after installiation

So I have very weird problem with android app that I developed that I really do not understand how to address.
Description of the problem: When I run the app in my emulator(and many other emulators) the app works perfectly, but when I list it on Google Play and some user download the app, it automatically crashes. so I just wonder if my androidmainfest is properly written.
*the program written in esclipse, java, android.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.app"
android:versionCode="6"
android:versionName="1.5" >
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="21" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<meta-data android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<activity
android:name="com.example.MainActivity"
android:label="#string/app_name"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.example.SurfaceExampleView"
android:label="#string/app_name"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="com.example.start" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.example.RulesGame"
android:label="#string/app_name" >
<intent-filter>
<action android:name="com.example.rules" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.example.PolicyGame"
android:label="#string/app_name" >
<intent-filter>
<action android:name="com.example.policy" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.example.RevenueGame"
android:label="#string/app_name" >
<intent-filter>
<action android:name="com.example.revenue" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.example.ShopGame"
android:label="#string/app_name" >
<intent-filter>
<action android:name="com.example.shop" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="#android:style/Theme.Translucent"/>
</application>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
</manifest>
You have posted only your manifest and not the logs. My guesses based on that is the problem may be within your package declaration, rest everything seems fine.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.app".....
The package should be unique and its like what we call package in java world. You have declared it as com.app whereas your app is using com.example.... package. Also com.app maybe used by other app.The package name defines your application's identity.
Once you publish your application, you cannot change the package name. As the package name defines your application's identity, so if you change it, then it is considered to be a different application and users of the previous version cannot update to the new version. So you may have to upload another app with different package name.
Try getting logs(use crashlytics) for your crash and we can look into it for the root cause.

Setting Wrong Application Name

I have my application named Umall but it is replaced by Slash that is my First Activity i am stuck with that small problem don't know how to handle it.. i gave application name directly in application lable
My Manifest.XML is
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ef.umall"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="#drawable/app_logo"
android:label="Umall"
android:theme="#style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="" >
</activity>
<activity
android:name=".activity.SplashActivity_"
android:label="#string/title_activity_splash" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".activity.HomeActivity"
android:label="#string/title_activity_home" >
</activity>
<activity
android:name=".activity.ProductsListActivity_"
android:label="#string/title_activity_products_list" >
</activity>
<activity
android:name=".activity.ProductDetail_"
android:label="#string/title_activity_product_detail" >
</activity>
<activity
android:name=".activity.CartActivity_"
android:label="#string/title_activity_cart" >
</activity>
<activity
android:name=".activity.ProductActivity_"
android:label="#string/title_activity_product" >
</activity>
<activity
android:name=".activity.UmallBaseActivity_"
android:label="#string/title_activity_umall_base" >
</activity>
<activity
android:name=".activity.ShopingChart"
android:label="#string/title_activity_shoping_chart" >
</activity>
</application>
</manifest>
Try to define the application name in your string.xml file and then replace this line :
<application
android:allowBackup="true"
android:icon="#drawable/app_logo"
android:label="#string/appname"
android:theme="#style/AppTheme" >
Where "appname" is a string in string.xml like :
<string name="appname">Umall</string>
can have a label attribute. If it's absent the label is inherited from the parent component (either Activity or Application). So using this, you can set a label for the launcher icon, while still having the Activity with it's own title.
so change this
<activity
android:name=".activity.SplashActivity_"
android:label="#string/title_activity_splash" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
to this
<activity
android:name=".activity.SplashActivity_"
android:label="#string/title_activity_splash" >
<intent-filter android:label="Umall">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
better to use #string/app_name
more info here

Categories