Unable to launch android app from launcher - android

I am launching my android app from android studio, the app is working fine but unable to launch it from the launcher as it is not showing up there. Looking at other posts it seems that this issue could be because of incorrect AndroidManifest.xml, but mine seems to fine based on other answers.
Below is AndroidManifest.xml from my project.
Full file is here -> https://pastebin.com/E7KMxQZD
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:roundIcon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme">
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="#string/facebook_app_id"/>
<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>

Related

You uploaded an Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter

I'm getting the error "You uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter, but without 'android:exported' property set. This file can't be installed on Android 12 or higher. See: developer.android.com/about/versions/12/behavior-changes-12#exported" when i'm trying to upload the app on google play, i have added android:exported wherever intent-filter service was.
App not uploading on play store due to android:exported error
My Mainfest File
<application
android:name="com.kashmirstudentupdate.ksu.MyApplication"
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="#mipmap/ic_launcher"
android:roundIcon="#mipmap/ic_launcher_round"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme"
android:usesCleartextTraffic="true">
<activity android:name="com.kashmirstudentupdate.ksu.activity.SplashActivity"
android:exported="true"
android:theme="#style/AppTheme.NoActionBar2">
<intent-filter>
<action android:exported="true" android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.kashmirstudentupdate.ksu.activity.MainActivity"
android:configChanges="screenSize|orientation"
android:theme="#style/AppTheme.NoActionBar">
</activity>
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="#string/admob_app_id" />
<meta-data
android:name="com.google.android.gms.ads.AD_MANAGER_APP"
android:value="true" />
<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>

When running my android studio app on my phone, it runs but does not save it on my phone

I have previously ran projects and they not only run but save as apps that I can open again later. Now for some reason this particular projects runs and opens but does not save as an app on my phone.
I'm sure I must be missing some simple setting but I can't find any solutions, any help would be appreciated.
Thanks
edit: I am using a Samsung s10 5g, I am coding in Kotlin, I didn't think these things were relevant because I can run my other projects which were also coded in Kotlin and those will save as normal apps on my phone.
<?xml version="1.0" encoding="utf-8"?>
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name=".Pythagorean">
</activity>
<activity
android:screenOrientation="portrait"
android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN">
</action>
</intent-filter>
</activity>
</application>
Go to Settings -> apps -> (find the application by name) -> uninstall for all users (Depends upon the device you are using)
Then run your app again via Android Studio in your phone. Check if it helps.
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name=".Pythagorean">
</activity>
<activity
android:screenOrientation="portrait"
android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>

re. Android) run an app to AndoridStudio or when you tried to install the apk app files are not visible

After Facebook Login connect, Run app in AndroidStudio, program execution is going with device, but the file will are not be visible. I do not know why this is the case happens.
I found a solution on the Internet. but I could not apply this solution in AndroidStudio here.
Has anyone experienced the same thing ? please tell me advice. thanks
have a problem with my AndroidManifest.xml file?
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.facebooktest.test.facebooktest">
<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:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="#string/fb_login_protocol_scheme" />
</intent-filter>
</activity>
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id" />
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="#string/app_name"
android:theme="#android:style/Theme.Translucent.NoTitleBar" />
</application>
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
please read over your question ask i have no idea what your talking about , and why am seeing your manifest if your issue file not found
If its about building apk
goto the build menu click build apk , it the same menu used to rebuild app -- clean app

App installing on Cellphone but not showing on screen

I am developing an android application using android studio, which has 2 activity so far, LoginActivity and the MainActivity, But when I run the application it installs in my cellphone or virtual machine, but does not appear anywhere. I looked into the installed application and the application is installed. I believe my problem is on the Manifest, but I do not know how to solve it.
The complete code is here on GitHub: https://github.com/SoftwareEngineeringClass/MobileApplication/tree/master/Minerva
and here is my manifest:
<?xml version="1.0" encoding="utf-8"?>
<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" >
<activity
android:name=".Minerva"
android:label="#string/app_name"
android:theme="#style/AppTheme.NoActionBar" >
<intent-filter>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".LoginActivity"
android:label="#string/app_name" >
<itent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</itent-filter>
</activity>
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="#string/app_name"
android:theme="#android:style/Theme.Translucent.NoTitleBar" />
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="#string/facebook_app_id" />
</application>
I believe the first thing I'd do is set a breakpoint at the beginning of the launcher Activity and see if execution gets there or not. No matter what Logcat will tell you something is wrong. You have to run it in debug mode of course. Attach the debugger. If you give me all your code I'd be more than happy to take a look and give you a definitive answer quickly.
Do you know if you require permissions? , maybe it is the problem that not allow you to run. Also if you can share your activity I can help you.

Android app built in eclipse wont run on phone

I've built an app that runs fine on the emulators, and says that it installs ok on the phone. However, on trying to run it an error pops up saying 'Application is not installed on your phone'. So I tried running the app through eclipse on the phone and I got this error in the console:
[2012-05-01 12:00:02 - MAD Assignment] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.mad.assignment/.MainMenu }
[2012-05-01 12:00:02 - MAD Assignment] ActivityManager: java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.mad.assignment/.MainMenu } from null (pid=8204, uid=2000) requires null
From looking for the solution elsewhere it sounds as though it could be a problem in the manifest file, so here is mine:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mad.assignment"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="10" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.READ_CONTACTS"/>
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
>
<activity
android:name="MainMenu"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Diary"></activity>
<activity android:name=".Info"></activity>
<activity android:name=".MapMenu"></activity>
<activity android:name=".RSSMenu"></activity>
<activity android:name=".RSSFeedView"></activity>
<activity android:name=".MainMenu"></activity>
<activity android:name=".RSSDetailed"></activity>
<activity android:name=".DiarySchedule"></activity>
<activity android:name=".DiaryAddEntry"></activity>
<activity android:name=".DiaryEditEntry"></activity>
<activity android:name=".DiaryDetailed"></activity>
<activity android:name=".RSSDetailed"></activity>
<uses-library android:name="com.google.android.maps"/>
<activity android:name=".MapMain"></activity>
<activity android:name=".RSSFeedView"></activity>
<activity android:name=".MapWhatsNearPreferences"></activity>
<activity android:name=".RoutePath"></activity>
</application>
Any ideas what this security exception is pointing to? Thanks!
The java.lang.SecurityException you are seeing is because you may enter two entries pointing to same activity. Remove the second one and you should be good to go.
You may be declared the activity 2 times in the manifest with different properties, like :
<activity android:name=".MainMenu"> </activity>
and
<activity android:name=".MainMenu" android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
You should remove the unwanted one from the manifest
Set android:debuggable="true" under application.
You have an activity named
<activity android:name=".MainMenu"></activity>
Which is the Intent'ed activity from the launcher. But the activity to which you gave permission is "Mainmenu". Remove it. Add the permission and etc to the ".Mainmenu" which is blank now.
ie,
The 'activity' group should be
<activity
android:name=".MainMenu"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".Diary"></activity>
<activity android:name=".Info"></activity>
<activity android:name=".MapMenu"></activity>
<activity android:name=".RSSMenu"></activity>
<activity android:name=".DiarySchedule"></activity>
<activity android:name=".DiaryAddEntry"></activity>
<activity android:name=".DiaryEditEntry"></activity>
<activity android:name=".DiaryDetailed"></activity>
<activity android:name=".RSSDetailed"></activity>
<uses-library android:name="com.google.android.maps"/>
<activity android:name=".MapMain"></activity>
<activity android:name=".RSSFeedView"></activity>
<activity android:name=".MapWhatsNearPreferences"></activity>
<activity android:name=".RoutePath"></activity>
And remove the duplicates as well. Why did you add so many duplicate 'activities' ?

Categories

Resources