Android应用。有效但不适用于平板电脑

时间:2013-03-19 14:45:19

标签: android cordova tablet

我在应用程序上工作,在API 8上没有问题。当我在平板电脑上试用它(Android 4.0.4-API 15?)时,它不起作用,尤其是带参数的网址(例如此文件:///android_asset/www/app.htm?typ = col& co = 1& ob = 1& zv = 2& dr = 1& tp = 0)没有任何事情发生。

Libs文件夹包含: android-support-v4.jar,cordova-2.5.0.jar,webviewissue17535fix.jar - 我不知道,如果这个修复程序只能包含在我的项目中,或者我还要做其他事情?

GapActivity.java:

package com.testing.test;

import org.apache.cordova.DroidGap;
import android.os.Bundle;

public class GapActivity extends DroidGap {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        super.loadUrl("file:///android_asset/www/index.html");
    }
}

清单:

    <supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:resizeable="true"
android:anyDensity="true" 
/>

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />                                                                               
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />

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

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
    <activity
        android:name="com.testing.test.GapActivity"
        android:configChanges="orientation|screenSize|keyboardHidden" 
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name="org.apache.cordova.DroidGap"
        android:label="@string/app_name"
        android:configChanges="orientation|screenSize|keyboardHidden">
        <intent-filter></intent-filter>
    </activity>
</application>
来自仿真器API 15的

log.txt

03-19 14:07:43.788: D/DroidGap(689): DroidGap.onCreate()
03-19 14:07:43.911: D/JsMessageQueue(689): Set native->JS mode to 2
03-19 14:07:43.911: D/DroidGap(689): DroidGap.init()
03-19 14:07:43.949: D/CordovaWebView(689): >>> loadUrl(file:///android_asset/www/index.html)
03-19 14:07:43.949: D/PluginManager(689): init()
03-19 14:07:43.990: D/CordovaWebView(689): >>> loadUrlNow()
03-19 14:07:43.990: D/DroidGap(689): Resuming the App
03-19 14:07:44.089: D/DroidGap(689): onMessage(onPageStarted,file:///android_asset/www/index.html)
03-19 14:07:44.089: D/SoftKeyboardDetect(689): Ignore this event
03-19 14:07:44.259: I/dalvikvm(689): threadid=3: reacting to signal 3
03-19 14:07:44.749: I/dalvikvm(689): Wrote stack traces to '/data/anr/traces.txt'
03-19 14:07:44.788: I/dalvikvm(689): threadid=3: reacting to signal 3
03-19 14:07:44.799: D/dalvikvm(689): GC_CONCURRENT freed 125K, 4% free 7456K/7687K, paused 6ms+8ms
03-19 14:07:44.979: I/dalvikvm(689): Wrote stack traces to '/data/anr/traces.txt'
03-19 14:07:46.078: D/Cordova(689): onPageFinished(file:///android_asset/www/index.html)
03-19 14:07:46.078: D/Cordova(689): Trying to fire onNativeReady
03-19 14:07:46.078: D/DroidGap(689): onMessage(onNativeReady,null)
03-19 14:07:46.078: D/DroidGap(689): onMessage(onPageFinished,file:///android_asset/www/index.html)
03-19 14:07:46.269: D/CordovaNetworkManager(689): Connection Type: 3g
03-19 14:07:46.269: D/DroidGap(689): onMessage(networkconnection,3g)
03-19 14:07:46.278: D/CordovaNetworkManager(689): Connection Type: 3g
03-19 14:07:46.288: D/DroidGap(689): onMessage(spinner,stop)
03-19 14:07:46.318: I/App(689): WARNING: Back Button Default Behaviour will be overridden.  The backbutton event will be fired!
03-19 14:07:48.099: D/DroidGap(689): onMessage(spinner,stop)
03-19 14:07:54.859: D/AudioPlayer(689): Send a onStatus update for the new seek
03-19 14:07:55.746: D/AudioPlayer(689): on completion is calling stopped
03-19 14:07:57.229: D/DroidGap(689): onMessage(onPageStarted,file:///android_asset/www/app.htm?typ=clo&co=1&ob=1&zv=2&dr=1&tp=0)
03-19 14:07:57.258: D/Cordova(689): onPageFinished(file:///android_asset/www/app.htm?typ=clo&co=1&ob=1&zv=2&dr=1&tp=0)

0 个答案:

没有答案