5

I think this question is very usual. Many results on Stackoverflow has said about this. The general answer is: because an old app is running, and I try to run a new one from Eclipse (but no change in compile), so Android will notice this.

But, I have done many things as I could:

  1. change something for eclipse rebuild again.
  2. Restart Eclipse or Emulator

But this warning still exists (and of course, my app still cannot run).

Here is my manifest file. Please take a look at this file and help me.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"\
    package="com.game.mrnom"
    android:versionCode="1"
    android:versionName="1.0" >
    <uses-sdk android:minSdkVersion="8" />
    <application
        android:debuggable="true"
        android:icon="@drawable/icon"
        android:label="Mr.Nom" >
        <activity
            android:label="Mr.Nom"
            android:name=".MrNomGame"
            android:screenOrientation="portrait"
            android:configChanges="keyboard|keyboardHidden|orientation" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
    <uses-permission android:name="android.permission.WAKE_LOCK"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-sdk android:targetSdkVersion="8" android:minSdkVersion="8"/>
</manifest>

Thank you for reading.

Note: This situation can occur whether or not you are using Eclipse, AndroiStudio or an emulator. It occurs when a application is running and a 'startActivity' request is made to start (perhaps another) activity in that application. The request activity is not started, the previous 'task' of the application is just brought to the foreground. In the case of starting the program from Eclipse, I suspect that Eclipse is issuing a startActivity request to the system on the emulator and that because some task/activity of the application is already in the foreground, that the expected behavior is not seen.

Ribo
  • 3,363
  • 1
  • 29
  • 35
hqt
  • 29,632
  • 51
  • 171
  • 250
  • 1
    I've removed your pastebin link - please try to avoid using it in future as if it goes away, the question becomes meaningless for future visitors. – RivieraKid Feb 10 '12 at 17:25
  • 1
    Oh. thank you. Because in other post, someone say post code in pastebin. So I think this forum culture. – hqt Feb 10 '12 at 17:29
  • No problem - everybody here is learning :-) – RivieraKid Feb 11 '12 at 00:12

5 Answers5

21

If you edit one character (delete a character and replace it) and then launch from eclipse, it will re-install the app, and you won't get this message.

braden
  • 1,496
  • 17
  • 31
3

If the app is already running on the emulator, and you haven't changed anything, you will see that message. Just restart the app on the emulator, ie close out the app then restart it. When you upload an app to the emulator, it loads it like it would on a real phone with an icon and all. you can even put that icon on the emulators home page.

Bill Gary
  • 2,987
  • 2
  • 15
  • 19
2

For me it works with this little trick:

Create a new Builder:

Project -> Properties -> Builders -> New -> Program
Name: Touch Manifest
Location: /usr/bin/touch
Arguments: ${project_loc:MyProjectName}/AndroidManifest.xml

Then move it up to the top of the list.

Each time you hit run, it will touch the manifest file and cause a reload of the package.

Enjoy!

edit: changed arguments, ${resource_loc} only works if the project is selected.

2

It has nothing to do with your manifest file. Whenever your compiled code will change, the new version will install over the previous version. Otherwise, the older app will run.

Vikram Singh
  • 1,726
  • 1
  • 13
  • 25
  • 1
    Yes. Your answer is very normal like others. and I have restarted my app many times. (of course with some small changes such as space,new line,etc). And I still met this problem. – hqt Feb 10 '12 at 17:26
  • 1
    Spaces and New lines are most probably removed during the compilation phase. So your compiled code still remains the same as the previous one. Add some new logic to your code or add some dummy variables. It should work then :) – Vikram Singh Feb 10 '12 at 17:32
0

If you get this warning it means you haven't changed any line of your code and this instance of your project is running on emulator or on your device. So if you want to run that again you can:

1- Make some changes in your code and then compile it again.

2- Or you can easily close the app and then relaunch it with eclipse or android studio or ...

If the problem still persist try to uninstall the app and run it again.

Milad Faridnia
  • 9,113
  • 13
  • 65
  • 78