Android应用程序无法加载在PathClassLoader某些手机 [英] Android app fails to load on some phones in PathClassLoader

查看:341
本文介绍了Android应用程序无法加载在PathClassLoader某些手机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序,让我们把它叫做'com.company.foo,以主要活动'foobar'命令。在我的Andr​​oidManifest.xml中,我有

I have an app, let us call it 'com.company.foo', with a main Activity 'FooBar'. In my AndroidManifest.xml, I have

<application android:label="@string/app_name"
             android:icon="@drawable/icon"
             android:theme="@android:style/Theme.NoTitleBar.Fullscreen"  >
    <activity android:name="FooBar"
              android:label="@string/app_name"
              android:configChanges="keyboardHidden|orientation" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
...
</application>

(其中的点包含在我的应用程序等活动)。在这种形式下,它工作正常在我的HTC渴望,并在模拟器上。然而,一个(非常)少数人谁下载了从市场报告中的应用程序与崩溃

(where the dots contain other activities inside my app). In this form, it works fine on my HTC desire and on the emulator. However, a (very) small number of people who downloaded the app from the market report a crash with

了java.lang.RuntimeException:无法实例活动ComponentInfo {com.company.foo/com.company.foo.FooBar}:抛出java.lang.ClassNotFoundException:com.company.foo.FooBar装载机dalvik.system.PathClassLoader [/mnt/asec/com.company.foo-1/pkg.apk]

java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.company.foo/com.company.foo.FooBar}: java.lang.ClassNotFoundException: com.company.foo.FooBar in loader dalvik.system.PathClassLoader[/mnt/asec/com.company.foo-1/pkg.apk]

有人建议更换安卓与 NAME =foobar如果安卓名=。FooBar的 ,而这又正常工作的我的手机和仿真器,但无法在其他一些设备。如果我离开这个属性了完全不会让我安装的。

Someone suggested to replace the android:name="FooBar" with android:name=".FooBar", which again works fine on my phone and the emulator, but fails on some other devices. If I leave this attribute out altogether it will not let me install at all.

任何想法?

推荐答案

我已经出版了Android电子市场中的应用程序。有时我会收到类似的崩溃报告。看来,这不是你的错。这可以,如果您的应用程序安装在SD卡进行复制。弹出此卡不卸载它,并运行你的应用程序。

I have an app published on Android Market. And sometimes I receive similar crash reports. Seems that's not your fault. This can be reproduced if your app is installed on SD card. Eject this card without unmounting it and run your app.

更多信息,可以发现<一href="http://groups.google.com/group/android-developers/browse_thread/thread/242effaaac01463a">here.

这篇关于Android应用程序无法加载在PathClassLoader某些手机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆