hqt hqt - 26 days ago 13
Android Question

Installation error: INSTALL_FAILED_MEDIA_UNAVAILABLE?

When I run an android app from eclipse I meet this error and my app does not start:


Installation error: INSTALL_FAILED_MEDIA_UNAVAILABLE

Please check

logcat output for more details. Launch canceled!


But when I opened logcat, I see that logcat doesn't print anything.

I think that some problem with my manifest file. so here is my manifest file:



android:installLocation="preferExternal">>

<uses-sdk android:minSdkVersion="8" />

<application

android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:debuggable="true" >

<activity
android:name=".HelloWorld"
android:label="Test" >

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


</activity>
</application>

<uses-sdk android:targetSdkVersion="8" android:minSdkVersion="8"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>




Answer Source

Is your Phone connected via USB? if yes, the SDCard is not mounted. Try to connect your phone in another mode or copy your software apk onto the SDCard, disconnect it from the pc and run the installation. It should work then :-)

For example, my Motorola Defy supports the usb modes "mass storage mode" and "media server" mode. In mass storage mode, the sdcard is unmounted from the device, so you can access it from your pc.

The problem is the "preferExternal" command, which tells Eclipse to try the installation on SDCard. You can also try to erase the installLocation command to install it your app in internal storage.

Greetings!