Phonegap Android应用程序意外关闭1.5

时间:2012-02-12 11:12:39

标签: android cordova

我正在使用Phonegap构建一个非常小的Android应用程序(它只是一个weiner dog的交互式动画......)。该应用程序在我的手机上正常工作(2.3.5)。现在我构建了一个项目的克隆,并将最小的SDK减少到3(这将是Android 1.5)。该应用程序仍可在我的手机上完美运行,但当我启动1.5 AVD或尝试将其安装在1.5手机上时,它会在启动时崩溃('应用程序意外关闭')。

我在网上找到了关于这个主题的一些信息,但这一切都可追溯到2010年初,并指出这是一个应该立即解决的Phonegap错误。

我在我的应用中使用的手机API是声音(Media)并检测应用是否可见( Events)。

我的manifest.xml看起来像这样:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.me.weinerDog"
    android:versionCode="1"
    android:versionName="1.0" >

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

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" >
        <activity
            android:name=".WeinerDogActivity"
            android:label="@string/app_name"
            android:screenOrientation="portrait"
            >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name="com.phonegap.DroidGap" android:screenOrientation="landscape" android:label="@string/app_name" android:configChanges="orientation|keyboardHidden">
            <intent-filter></intent-filter>          
        </activity>
     </application>

</manifest>

plugins.xml中的res\xml如下:

<?xml version="1.0" encoding="utf-8"?>
<plugins>
    <plugin name="App" value="com.phonegap.App"/>
    <plugin name="Geolocation" value="com.phonegap.GeoBroker"/>
    <plugin name="Device" value="com.phonegap.Device"/>
    <plugin name="Accelerometer" value="com.phonegap.AccelListener"/>
    <plugin name="Compass" value="com.phonegap.CompassListener"/>
    <plugin name="Media" value="com.phonegap.AudioHandler"/>
    <plugin name="Camera" value="com.phonegap.CameraLauncher"/>
    <plugin name="Contacts" value="com.phonegap.ContactManager"/>
    <plugin name="Crypto" value="com.phonegap.CryptoHandler"/>
    <plugin name="File" value="com.phonegap.FileUtils"/>
    <plugin name="Network Status" value="com.phonegap.NetworkManager"/>
    <plugin name="Notification" value="com.phonegap.Notification"/>
    <plugin name="Storage" value="com.phonegap.Storage"/>
    <plugin name="Temperature" value="com.phonegap.TempListener"/>
    <plugin name="FileTransfer" value="com.phonegap.FileTransfer"/>
    <plugin name="Capture" value="com.phonegap.Capture"/>
</plugins>

在AVD中运行时,Eclipse控制台不会报告崩溃时的任何错误。 最近有人见过这个吗?我正在使用Phonegap 1.4.1。谢谢!

3 个答案:

答案 0 :(得分:1)

我认为有些插件需要2.2 尝试删除不需要的插件

答案 1 :(得分:1)

当PhoneGap发布1.0版时,它取消了对Android 2.1之前SDK的支持。如果你想支持Android 1.5或1.6,你需要回到PhoneGap 0.9 *之一。

答案 2 :(得分:0)

我已经研究过,它说phongap需要7 [Android 2.1]的最小sdk来运行概率

这有点奇怪...... 它可以在设备上运行