I'm trying to run App that has a search in its action bar and also it shares in twitter. When I run my App, I got this message in console
Application already deployed. No need to reinstall.
\Healthy_Tips2\bin\Healthy_Tips2.apk installed on device
Done!
But I can't find my App with Apps menu in the device and the App is not launching..
The following is the code of my start activity manifest.xml
<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" />
<action android:name="android.intent.action.SEARCH" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="com.emy.healthytips.MainActivity"
android:scheme="oauth" />
</intent-filter>
<meta-data android:name="android.app.searchable"
android:resource="#xml/searchable"/>
<!-- enable the base activity to send searches to itself -->
<meta-data
android:name="android.app.default_searchable"
android:value=".MainActivity" />
</activity>
Aside from uninstalling the previous app through adb like the others have already mentioned.
In your manifest, you should increment your versionCode="1" by 1 more and break down your intent filter into two. This will still work. An activity can have more than one intent-filter.
<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.SEARCH" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="com.emy.healthytips.MainActivity"
android:scheme="oauth" />
</intent-filter>
Go to Project -> clean -> run your project.
this will rebuild your project.
Then run your project again. Usually works. Or else are you sure you are not trying to run a library Project??
Use adb to uninstall your application:
adb uninstall package_name
See link:
http://adbshell.com/commands/adb-uninstall/how-to-use-adb-uninstall.html
Edit: Go to sdk/platformtools under command line tool. And write this line:
adb uninstall <package_name>
Make any change to your app. add a comment or so, or uninstall your app then deploy again.
I personally always have the same problem, when I'm trying to install an apk via phone, although it's already installed via PC. For me it works to simply deinstall the final app and try once more to install the apk.
I get this error when I try running my app without making changes when the app is already open.
Try closing/restarting your emulator/phone and reopening it.
Also try making a change to the app, then deleting it and save it (type "A" anywhere in the code then remove it).
Then try cleaning your project: project > clean
If that doesn't work, try uninstalling the app after trying above methods and try again. This should work.
Related
I have a problem when I try to debug the App on my Phone. The App works, but It is not installed on the device. When I created the project I selected a project without Activity (option: "Add No Activity"). If I create an App with a blank Activity, this is installed when I launch the debug. I'm using Android Studio for the project.
What can I do? Thanks!
Because you have to Specify Your App's Launcher Activity. You should put this line into your manifest in actvity tag like this, For more reference check this link Specify Your App's Launcher Activity
<activity
android:name=".DemoActivity"
android:label="#string/app_name"
android:windowSoftInputMode="adjustResize|stateVisible" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.categor.LAUNCHER" />
</intent-filter>
</activity>
Problem solved!
Android Studio is stupid, it adviced me to write this in capital letters
<action android:name="ANDROID.INTENT.ACTION.MAIN" />
<category android:name="ANDROID.INTENT.CATEGORY.LAUNCHER" />
instead
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
Normally when I run or debugg my application, it unistalls the old version, installs new version and finally it runs the new application, same process when I debug. Some days ago my eclipse started to work in a different way, it installs my application but it does not get ran. Before intalling I get this LogCat:
No Launcher activity found!
The launch will only sync the application package on the device!
Here my Manifest:
<activity
android:name="com.company.app.activities.WelcomeActivity"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Can anybody help me with this? If I want to run the applications it's not a problem because I just have to do it manually but I can not debug.
Remove the follwing line from your manifest and try ,
<action android:name="android.intent.action.VIEW" />
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.
I got this warning from console when running my application on emulator
No Launcher activity found!
The launch will only sync the application package on the device!
In fact i have declared an activity as the main launcer in AndroidManifest.xml file
<activity
android:name=".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>
I don't need any other intent-filter to use on that activity.. just basic main and launcher
What's the reason? Please give me a solution..
If the launcher activity is in another package, you will need to specify that as well.
For instance, from one of my personal projects:
<activity
android:name=".activities.MainScreen"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
The MainScreen.java is in the activities package. Also, check spelling for upper or lower case letters.
It seems that you must have "android.intent.action.MAIN" specified immediately before "android.intent.category.LAUNCHER". I encountered the same issue as you when I had the following:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.SEARCH" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
The issue was resolved only when I re-orderd as follows:
<intent-filter>
<action android:name="android.intent.action.SEARCH" />
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
In all normal circumstances, listen to what the other guy(s) said.
I was able to replicate your issue using a Mac Book Pro & Eclipse Indigo. when you create your android project, you MUST have Eclipse start you off with a templated activity (like a blank activity). if you don't, and you try to add an activity to your manifest later, Eclipse just derps and can't find the launcher. (i looked at other manifest files and i can't see any differences. i really don't think it's your poor manifest's fault in this special case.)
here's your lazy easy fix:
start a new project, and copy over all the files (make sure you back up ur files first, in case you delete something wrong or mess up the ordering)
Using Eclipse Indigo, open Run Configurations windows, click the project and use launch default activity on Android tab, choose Automatically pick compatible device...and apply.
I have exported my app from eclipse and installed it on my phone. After installation, I click open from package installer, but the installer force close. Afterwards, when I tried to launch the app, nothing happen after I click it. I click the app in app drawer but it return to home screen instead.
I am able to run in emulator and in debug mode when I connect my device via usb, but not when I export the apk to install.
Note that this is not the first app that I exported to install. Previous apps are working fine.
I found the problem! I had declared the activity 2 times in the manifest with different properties, like:
<activity android:name=".myclass"></activity>
and
<activity android:name=".myclass" android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Remove the unwanted one from the manifest and it will work.
Check your android emulator version and the firmware version of the phone. If firmware version is not supported for that app you will be install from adb, but you cant start the app.
Check the settings to be able to install the unknown apps in
Settings->Applications and check box "Unknown Sources"
Try to check on permission in Android Manifest. I was having the same problem earlier when i install a NFC app. I forget to give permission for NFC. After i gave the permission it works fine for me. Please check your AndroidManifest.
I spent few days to identify the problem why it occurred .But I solved my problem this way- Modification in Android Manifest
<activity android:configChanges >
<intent-filter android:label="#string/launcher_name">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<I removed my code here that i added for reference to google play store for reference >
Remove the unwanted one from the manifest and it will work.
Try to search errors in your Android manifest, i have the same problem and the problem was the 'R' in the category LAUNCHER are in lower case.
like this:
<category android:name="android.intent.category.LAUNCHEr" />
to solve it, simple:
<category android:name="android.intent.category.LAUNCHER" />
android:theme="#style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Removing the configuration of all the modules that are not from the app worked for me. In other words, just leave the Project.app module and check its configuration.
Edit Run/Debug Configurations -> Android app -> app
GL
if you use splash in react native:
To avoid error: Binary XML file line #XXX: requires a valid src attribute
inside a layer-list, use:
<item android:drawable="#drawable/image" />
instead of:
<item>
<bitmap android:src="#drawable/image"/>
</item>
My solution is to add this flag in download manager when application is install
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
In my case - i had this flag -> intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
I replaced it with Intent.FLAG_ACTIVITY_NEW_TASK and everything worked!
My Manifest looked like this. Those that need help and have a similar manifest look bellow.
<activity android:name=".login.activities.SplashScreenActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.VIEW"/>
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data
android:host="example.com"
android:scheme="https"/>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
You just need to remove the
< data>
element in the intent-filler and it should work.