当我从 Eclipse 运行一个 android 应用程序时,我遇到了这个错误并且我的应用程序没有启动:
Installation error: INSTALL_FAILED_MEDIA_UNAVAILABLE
Please check
logcat output for more details. Launch canceled!
但是当我打开 logcat 时,我发现 logcat 没有打印任何内容。
我认为我的 list 文件有问题。所以这是我的 list 文件:
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"/>
最佳答案
您的手机是否通过 USB 连接?如果是,则未安装 SDCard。尝试以其他模式连接您的手机或将您的软件 apk 复制到 SDCard 上,将其与 PC 断开连接并运行安装。它应该可以工作:-)
例如,我的摩托罗拉 Defy 支持 USB 模式“大容量存储模式”和“媒体服务器”模式。在大容量存储模式下,SD卡会从设备上卸载,因此您可以从您的电脑上访问它。
问题在于“preferExternal”命令,它告诉 Eclipse 尝试在 SDCard 上安装。 您也可以尝试清除 installLocation 命令以将其安装到您的内部存储中。
您好!
关于android - 安装错误: INSTALL_FAILED_MEDIA_UNAVAILABLE?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9273526/