PhoneGap的+ jQuery Mobile的:Android的崩溃,当我点击一个链接 [英] Phonegap + JQuery Mobile: Android crash when I click on a link

查看:114
本文介绍了PhoneGap的+ jQuery Mobile的:Android的崩溃,当我点击一个链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个问题的PhoneGap +的Andr​​oid + jQuery Mobile的。

I've a problem with Phonegap + Android + JQuery Mobile.

Android的关闭我的应用程序,当我点击的index.html中的链接,但我不知道为什么...
Eclipse的控制台不给我任何错误。

Android close my application when I click on a link on the index.html but I don't know why... the console of eclipse doesn't give me any error.

我的活动:

package it.test.app;

import android.os.Bundle;
import com.phonegap.*;

public class testActivity extends DroidGap {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        super.loadUrl("file:///android_asset/www/index.html");
    }
}

在我的index.html链接的例子:

Example of a link in my index.html:

<a href="page_1.htm">Link</a>

我还创建相同的应用程序的iPhone和iPad以及所有作品的权利。

I also created the same app for iPhone and iPad and all works right.

你能帮助我吗?

谢谢!

推荐答案

speding了很多时间寻找一个解决方案后,我找到的Andr​​oid这个bug:

After speding a lot of time looking for a solution i've found this bug of Android:

<一个href=\"http://$c$c.google.com/p/android/issues/detail?id=6593\">http://$c$c.google.com/p/android/issues/detail?id=6593

在较差的话Android不喜欢通过Ajax调用HTML或XML这个标签来获取:

In poor words Android doesn't like to get via ajax call an html or xml with this tags:

<meta name="viewport" content="width=device-width; initial-scale=1.0 user-scalable=0;" />

<link rel="apple-touch-icon" type="image/png" href="/pics/apple-touch-icon.png" />

和通常所有的特殊标签的移动应用程序。

and generally all the "special tags" for mobile application.

如果没有这个标记和相对属性上的链接所有的作品就像一个魅力。

Without this tags and the "rel" attributes on links all works like a charm.

亚行

这篇关于PhoneGap的+ jQuery Mobile的:Android的崩溃,当我点击一个链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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