Android Apk generating multiple files after installation on System (Mobile) - android

My apk file generating multiple files after installation on the system as shown in screenshot. Please help me, what to do??

Most likely this is one App having multiple activities marked as action=MAIN and category=LAUNCHER:
<activity android:name=".ExampleActivity1" android:icon="#drawable/app_icon">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".ExampleActivity2" android:icon="#drawable/app_icon">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
See also this SO question: Two main activities in AndroidManifest.xml

Related

How do I fix this error in Android Studio?

I've been getting this error every now and then, and once I thought it was fixed, it just came back:
Error while executing: am start -n "com.example.wolfixfinal/com.example.wolfixfinal.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.wolfixfinal/.MainActivity }
Error type 3
Error: Activity class {com.example.wolfixfinal/com.example.wolfixfinal.MainActivity} does not exist.
Error while Launching activity
Failed to launch an application on all devices
I've made two or three other questions about this topic and it's getting annoying. I've tried removing the gradle and .gradle folder, removing the .idea folder and then rebuilding the project. I don't know what to do anymore.
How do I keep this from not happening, is it something I have to do all the time everytime I see this error.
Make sure than only ONE of your activities has the LAUNCHER and MAIN properties in your Manifest file. This file can be found under Android Project view: app > manifests > AndroidManifest.xml. The one you want to boot in is the one that should have these properties.
Like this:
<activity
android:name=".Splash"
android:exported="true">
<!--This will be the starting activity you want-->
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:exported="true"/>
NOT like this (2 activities in the manifest both have:
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
):
<activity
android:name=".Splash"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

Android duplicate apk

When I build the project, two identical apks are generated:
The structure of the project as it is.
Can anyone say why it's happening, pls! ty
because of add two intent-filter (category luncher)
need to remove this
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Remove duplicate
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
From your AndroidManifestfile. Check Both Module's AndroidManifest File

android app installed but not able to see

I am new to android app development. I created an app using Eclipse
and successfully installed on my device. Even it got installed on
the emulator.But, I can't see it!
I have tried everything like adding :
In manifest.xml
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Re-installing
Tried directly sending and installing .apk to the device
(not only by running on eclipse)
Restarting my eclipse
and so on.
Let me know if any other information is required.
Its not going to be on the main page. Go to downloaded applications on your device and check if its there. Also make sure USB debugging in turned on in the developers options on your phone. Also read this.
What about checking the list of installed packages?
$ adb shell pm list packages | grep your.package.name
Or just look up the directory.
$ adb shell ls /data/app
If it's really installed but not be shown in the launcher, then it would be a manifest code issue, I think.
I got this problem few month ago, then i got that i am using more category and action tag in activity.
like this:
<activity
android:name="com.test.login.UserLogin"
android:label="#string/app_name"
android:screenOrientation="portrait"
>
<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:host="t4jsample"
android:scheme="oauth" />
</intent-filter>
</activity>
but my problem solved using this:
<activity
android:name="com.test.login.UserLogin"
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>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="t4jsample"
android:scheme="oauth" />
</intent-filter>
So i want to say that please check your code and let me know that you are getting some this case in your code.

add my TTS Engine to Android TTS Serivce like SAPI

I have developed my own TTS apps in Android. Is there any way to deploy my TTS engine into the OS instead on running the TTS apps, so that other apps can call my TTS? Something like SAPI in MS Window. SVOX can package the engine as apk and after installed, it adds new engines into the Andorid OS, not sure how can I do that same.
For your text-to-speech engine to show up in the list of available services, you'll need to add the appropriate activities and manifest entries.
For API 14 and above, you need to extend TextToSpeechService and you need to add the following to your manifest:
<service
android:name=".MyTextToSpeechService"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.TTS_SERVICE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<meta-data
android:name="android.speech.tts"
android:resource="#xml/tts_engine" />
</service>
This references res/xml/tts_engine.xml, which should look like this:
<?xml version="1.0" encoding="utf-8"?>
<tts-engine xmlns:android="http://schemas.android.com/apk/res/android"
android:settingsActivity="com.example.MyTtsSettingsActivity" />
You'll also need to add a variety of supporting activities. Here's what you'll be adding to your manifest:
<activity
android:name=".DownloadVoiceData"
android:theme="#android:style/Theme.Dialog" >
<intent-filter>
<action android:name="android.speech.tts.engine.INSTALL_TTS_DATA" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".CheckVoiceData"
android:theme="#android:style/Theme.Translucent.NoTitleBar" >
<intent-filter>
<action android:name="android.speech.tts.engine.CHECK_TTS_DATA" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".GetSampleText"
android:theme="#android:style/Theme.Translucent.NoTitleBar" >
<intent-filter>
<action android:name="android.speech.tts.engine.GET_SAMPLE_TEXT" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".TtsSettingsActivity"
android:label="#string/tts_settings_label" >
<intent-filter>
<action android:name="android.speech.tts.engine.CONFIGURE_ENGINE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<!-- Legacy code for pre-ICS compatibility. -->
<activity
android:name=".MyTtsEngine"
android:label="#string/app_name"
android:theme="#android:style/Theme.Translucent.NoTitleBar" >
<intent-filter>
<action android:name="android.intent.action.START_TTS_ENGINE" />
</intent-filter>
</activity>
<provider
android:name="com.googlecode.eyesfree.espeak.providers.SettingsProvider"
android:authorities="com.googlecode.eyesfree.espeak.providers.SettingsProvider" />
If you're planning on supporting pre-ICS versions of Android, you'll also need a shared library that conforms to a specific API.
I won't go into details of the implementation of each activity here, or into the pre-ICS API, but you can find examples in the source code for the Android port of eSpeak TTS engine:
http://code.google.com/p/eyes-free/source/browse/trunk/tts/espeak-tts/

No Launcher Activity found with .Launcher in Manifest.xml already included?

I am trying to run a source code I've found online for android. When I run it, it gives me:
No Launcher activity found!
The launch will only sync the application package on the device!
Performing sync
I already have in my Manifest.xml the following:
action android:name="android.intent.action.MAIN"
category android:name="android.intent.category.LAUNCHER"
What could be wrong? The weird thing is that it worked once. And then when I ran it again it gave me needs to force the application.
It is not a duplicate question because I've read that everyone is suggesting to place those in the Manifest.xml.
I think you need to define a launching activity. For example in my app
<activity android:name=".Main"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
I have defined which activity is started on app start.
please make sur to add android:exported="true" it will be like that
<activity android:name=".MainActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

Categories

Resources