应用程序无法启动在所有的Andr​​oid 2.2(升级Froyo) [英] App cannot start at all in Android 2.2 (Froyo)

查看:135
本文介绍了应用程序无法启动在所有的Andr​​oid 2.2(升级Froyo)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用程序已经好了工作,直到最近的Froyo更新。在安装了Android 2.2 SDK后,我可以编译我的code没有任何错误。然而,当我运行它,它只是强制关闭:

My app has been running okay until the recent Froyo update. After installing the Android 2.2 SDK, I can compile my code without any errors. However, when I run it, it just force closes:

下面是日志:

05-23 10:15:13.463: DEBUG/AndroidRuntime(423): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<

05-23 10:15:13.463: DEBUG/AndroidRuntime(423): CheckJNI is ON

05-23 10:15:14.193: DEBUG/AndroidRuntime(423): --- registering native functions ---

05-23 10:15:15.293: DEBUG/AndroidRuntime(423): Shutting down VM

05-23 10:15:15.303: DEBUG/dalvikvm(423): Debugger has detached; object registry had 1 entries
05-23 10:15:15.333: 

INFO/AndroidRuntime(423): NOTE: attach of thread 'Binder Thread #3' failed

05-23 10:15:16.003: DEBUG/AndroidRuntime(431): >>>>>>>>>>>>>> AndroidRuntime START <<<<<<<<<<<<<<
05-23 10:15:16.013: 

DEBUG/AndroidRuntime(431): CheckJNI is ON

05-23 10:15:16.273: DEBUG/AndroidRuntime(431): --- registering native functions ---

05-23 10:15:17.392: INFO/ActivityManager(59): Starting activity: Intent { act=android.intent.action.MAIN cat=

[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.handyapps.easymoney/.EasyMoney }

05-23 10:15:17.602: DEBUG/AndroidRuntime(431): Shutting down VM

05-23 10:15:17.662: DEBUG/dalvikvm(431): Debugger has detached; object registry had 1 entries

05-23 10:15:17.742: INFO/AndroidRuntime(431): NOTE: attach of thread 'Binder Thread #3' failed

05-23 10:15:17.912: INFO/ActivityManager(59): Start proc com.handyapps.easymoney for activity 

com.handyapps.easymoney/.EasyMoney: pid=438 uid=10035 gids={1006, 1015}

05-23 10:15:19.032: DEBUG/AndroidRuntime(438): Shutting down VM

05-23 10:15:19.032: WARN/dalvikvm(438): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
05-23 

10:15:19.062: ERROR/AndroidRuntime(438): FATAL EXCEPTION: main

05-23 10:15:19.062: ERROR/AndroidRuntime(438): java.lang.RuntimeException: Unable to instantiate application 

com.handyapps.easymoney.EasyMoney: java.lang.ClassCastException: com.handyapps.easymoney.EasyMoney

05-23 10:15:19.062: ERROR/AndroidRuntime(438):     at android.app.ActivityThread$PackageInfo.makeApplication

(ActivityThread.java:649)

05-23 10:15:19.062: ERROR/AndroidRuntime(438):     at android.app.ActivityThread.handleBindApplication

(ActivityThread.java:4232)

05-23 10:15:19.062: ERROR/AndroidRuntime(438):     at android.app.ActivityThread.access$3000(ActivityThread.java:125)

05-23 10:15:19.062: ERROR/AndroidRuntime(438):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2071)

05-23 10:15:19.062: ERROR/AndroidRuntime(438):     at android.os.Handler.dispatchMessage(Handler.java:99)

05-23 10:15:19.062: ERROR/AndroidRuntime(438):     at android.os.Looper.loop(Looper.java:123)

05-23 10:15:19.062: ERROR/AndroidRuntime(438):     at android.app.ActivityThread.main(ActivityThread.java:4627)

05-23 10:15:19.062: ERROR/AndroidRuntime(438):     at java.lang.reflect.Method.invokeNative(Native Method)

05-23 10:15:19.062: ERROR/AndroidRuntime(438):     at java.lang.reflect.Method.invoke(Method.java:521)

05-23 10:15:19.062: ERROR/AndroidRuntime(438):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run

(ZygoteInit.java:868)

05-23 10:15:19.062: ERROR/AndroidRuntime(438):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)

05-23 10:15:19.062: ERROR/AndroidRuntime(438):     at dalvik.system.NativeStart.main(Native Method)

05-23 10:15:19.062: ERROR/AndroidRuntime(438): Caused by: java.lang.ClassCastException: com.handyapps.easymoney.EasyMoney

05-23 10:15:19.062: ERROR/AndroidRuntime(438):     at android.app.Instrumentation.newApplication(Instrumentation.java:957)

05-23 10:15:19.062: ERROR/AndroidRuntime(438):     at android.app.Instrumentation.newApplication(Instrumentation.java:942)

05-23 10:15:19.062: ERROR/AndroidRuntime(438):     at android.app.ActivityThread$PackageInfo.makeApplication

(ActivityThread.java:644)

05-23 10:15:19.062: ERROR/AndroidRuntime(438):     ... 11 more

05-23 10:15:19.082: WARN/ActivityManager(59):   Force finishing activity com.handyapps.easymoney/.EasyMoney

05-23 10:15:19.592: WARN/ActivityManager(59): Activity pause timeout for HistoryRecord{450018f0 

com.handyapps.easymoney/.EasyMoney}

////////////// Android清单文件////

 

<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-feature android:name="android.hardware.camera" />

<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4" />
    <application android:icon="@drawable/icon" 
    android:name="@string/app_name"  android:label="@string/app_name" 
    android:debuggable="false">
    <activity android:name=".EasyMoney"
    android:label="@string/app_name" 
    android:theme="@android:style/Theme.NoTitleBar" 
    android:launchMode="singleTask" 
    android:clearTaskOnLaunch="true">
   <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity android:name=".TranList" android:label="@string/app_name" android:theme="@android:style/Theme.Light.NoTitleBar"/>
    <activity android:name=".TranEdit" android:theme="@android:style/Theme.Light.NoTitleBar" android:windowSoftInputMode="stateAlwaysHidden"/>
    <activity android:name=".BillReminderEdit" android:theme="@android:style/Theme.Light.NoTitleBar" android:windowSoftInputMode="stateAlwaysHidden"/>
    <activity android:name=".BillReminderList" android:launchMode="singleTop" android:theme="@android:style/Theme.Light.NoTitleBar"/>
    <activity android:name=".BudgetList" android:theme="@android:style/Theme.Light.NoTitleBar"/>
    <activity android:name=".BudgetEdit" android:theme="@android:style/Theme.Light.NoTitleBar" android:windowSoftInputMode="stateAlwaysHidden"/>
    <activity android:name=".Search" android:theme="@style/CustomDialogTheme" android:windowSoftInputMode="stateAlwaysHidden"/>
    <activity android:name=".PasscodeEntry" android:theme="@style/CustomDialogTheme" android:windowSoftInputMode="stateAlwaysHidden" android:screenOrientation="portrait"/>
    <activity android:name=".AccountList" android:theme="@android:style/Theme.Light.NoTitleBar">
    </activity>
    <activity android:name=".AccountEdit" android:theme="@android:style/Theme.Light.NoTitleBar" android:windowSoftInputMode="stateAlwaysHidden"/>
    <activity android:name=".UserSettingsEdit" android:theme="@android:style/Theme.Light.NoTitleBar" android:windowSoftInputMode="stateAlwaysHidden"/>
    <activity android:name=".CurrencySettingsEdit" android:theme="@android:style/Theme.Light.NoTitleBar" android:windowSoftInputMode="stateAlwaysHidden"/>
    <activity android:name=".DisplaySettingsEdit" android:theme="@android:style/Theme.Light.NoTitleBar" android:windowSoftInputMode="stateAlwaysHidden"/>
    <activity android:name=".BackupSettingsEdit" android:theme="@android:style/Theme.Light.NoTitleBar" android:windowSoftInputMode="stateAlwaysHidden"/>
    <activity android:name=".CategoryList" android:theme="@android:style/Theme.Light.NoTitleBar" />
    <activity android:name=".CategoryEdit" android:theme="@android:style/Theme.Light.NoTitleBar" android:windowSoftInputMode="stateAlwaysHidden"/>
    <activity android:name=".ExpenseByCategory" android:theme="@android:style/Theme.Light.NoTitleBar"/>
    <activity android:name=".BalanceReport" android:theme="@android:style/Theme.Light.NoTitleBar"/>
    <activity android:name=".MonthlyExpenseReport" android:theme="@android:style/Theme.Light.NoTitleBar"/>
    <activity android:name=".MonthlyIncomeReport" android:theme="@android:style/Theme.Light.NoTitleBar"/>
    <activity android:name=".MonthlyCashflowReport" android:theme="@android:style/Theme.Light.NoTitleBar"/>
    <activity android:name=".PhotoList" android:theme="@android:style/Theme.Light.NoTitleBar" />
    <activity android:name=".ExpenseByPayee" android:theme="@android:style/Theme.Light.NoTitleBar"/>
    <activity android:name=".ExpenseBySubCategory" android:theme="@android:style/Theme.Light.NoTitleBar"/>

    <service android:name="StartAlarm_Service">
    <intent-filter>
    <action android:name="com.handyapps.easymoney.StartAlarm_Service" />
    </intent-filter>
</service>
<service android:name=".AlarmService_Service" android:process=":remote" />
<receiver android:name="StartupIntentReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<category android:name="android.intent.category.HOME" />
</intent-filter>
</receiver>

<receiver android:name=".WidgetProvider" android:label="@string/widget_name">
        <intent-filter>
            <action
                android:name="android.appwidget.action.APPWIDGET_UPDATE" />
        </intent-filter>
        <meta-data
            android:name="android.appwidget.provider"
            android:resource="@xml/widget" />
    </receiver>
    <receiver
        android:name=".WidgetProvider" android:label="@string/widget_name">
        <intent-filter>
            <action
                android:name="android.appwidget.action.APPWIDGET_UPDATE" />
                <data android:scheme="easymoney_widget" />
        </intent-filter>
        <meta-data
            android:name="android.appwidget.provider"
            android:resource="@xml/widget" />
    </receiver>
    <receiver android:name=".WidgetProvider">
        <intent-filter>
            <action android:name="com.handyapps.easymoney.WIDGET_CONTROL" />
            <data android:scheme="easymoney_widget" />
        </intent-filter>
    </receiver>
</application>

主启动类是com.handyapps.easymoney.EasyMoney。我把一个断点处的onCreate()方法的开始,但我发现它甚至都没有到达那里。不知何故,该应用程序就是无法在Android 2.2的装...但它完美罚款全部previous的Andr​​oid版本。一直在努力寻找原因在过去的2天,但我完全难住了!

The main startup class is com.handyapps.easymoney.EasyMoney. I placed a breakpoint at the start of the onCreate() method but I discovered it didn't even reach there. Somehow, the application just couldn't be loaded in Android 2.2... but it works perfectly fine for all the previous Android versions. Been trying to find the cause for the past 2 days but am totally stumped!!

推荐答案

大家好,我已经找到了解决方案!只需要删除的android:从清单中的应用程序标签name属性......但是编译器应该给一个警告或错误

Guys, I've found the solution! Just need to remove the android:name attribute from the application tag in the manifest... but the compiler should have given a warning or error.

这篇关于应用程序无法启动在所有的Andr​​oid 2.2(升级Froyo)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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