简体   繁体   中英

App won't install but runs fine in emulator

How can I diagnose apk install issues? I have an app that compiles and runs in the emulator without any issues. But as soon as I export and try to load on my phone, it fails to install with no error to point me in the right direction.

If the application is already installed or signed with a different key you may not be able to install the application again. Another way you can install the application is to use adb from the terminal with the reinstall option:

adb install -r myApp.apk

It is also best to try doing this with another terminal or DDMS running logcat so you can see if there are any errors that happen when you try to install the application.

i have the same issue,The problem was the main activity in my AndroidManifest.xml file was written twice.i delete the first one and issue solved

 <activity
        android:name=".SplashScreen"
        android:configChanges="orientation|keyboardHidden|screenSize"
        android:label="@string/title_activity_splash_screen"
        android:theme="@style/FullscreenTheme" >
    </activity>

so this activity is once defined here and twice again in AndriodManifest

<activity
        android:name=".SplashScreen">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

Whatever issues I faced file installing application on device that is I m discussing.

  • Check whether you are installing application at right place(usually data/app)

  • Check permission for directory that you have right to install application in directory if not change the permission.

  • Still won't work try to install application in system/app folder.

Are you installing it via Eclipse or sending it to phone other way and trying to do it with system file manager?

Some standard file managers don't allow you to install .apk. You have to send the file via Bluetooth or in some other way "receive" it.

You will have to turn on USB debugging on your phone. On the device, go to the home screen, press MENU, select Applications > Development, then enable USB debugging. Then in Eclipse switch to the Debug perspective (Menu Bar -> Window -> Open Perspective -> Debug). You will see a view called logcat with Android icon. Click on it, it will display the debugging messages. Now, install the app on the phone using Eclipse and check the logcat for the error message.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM