Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/mercurial/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
以Android SDK 14或更高版本为目标会导致我的应用程序无法显示_Android - Fatal编程技术网

以Android SDK 14或更高版本为目标会导致我的应用程序无法显示

以Android SDK 14或更高版本为目标会导致我的应用程序无法显示,android,Android,当我瞄准Android SDK 12时,我的应用程序在我的Galaxy Nexus上显示得非常好。整个视图本质上是一个WebView。布局如下: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layou

当我瞄准Android SDK 12时,我的应用程序在我的Galaxy Nexus上显示得非常好。整个视图本质上是一个WebView。布局如下:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="horizontal"
    android:id="@+id/mainLayout">
    <com.hudson.component.HWebWebView android:id="@+id/browser"
        android:layout_height="fill_parent" android:layout_width="fill_parent">    </com.hudson.component.HWebWebView>

</LinearLayout>

HWebView只是扩展了WebView以提供额外的功能

我开始转向目标Android SDK 15,突然我明白了这一点

问题是我只是不知道从哪里开始寻找,以找出到底是什么错了。任何出发点都将不胜感激

编辑:因此,我仔细研究了代码的主体并对其进行了注释,最终找到了错误所在。在我的舱单上

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

我需要

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

我要尝试的第一件事是返回到常规的WebView,而不是HWebView类,看看这是否有效。如果是这样,问题就缩小了


您可以尝试的另一件事是使用委托模式,而不是扩展WebView。我的意思是让您的代码或XML实例化一个Webview,获取该视图的句柄,并对其调用方法。我看到的所有示例都是这样工作的。

我要尝试的第一件事是返回到常规的WebView,而不是HWebView类,以查看这是否有效。如果是这样,问题就缩小了


您可以尝试的另一件事是使用委托模式,而不是扩展WebView。我的意思是让您的代码或XML实例化一个Webview,获取该视图的句柄,并对其调用方法。我看到的所有示例都是这样工作的。

因此,我仔细研究了代码的主体并对其进行了注释,最终找到了错误所在。在我的舱单上

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

我需要

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

因此,在我的代码主体周围挖掘并注释出来,我终于找到了错误所在。在我的舱单上

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

我需要

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