在Android上的PhoneGap的网络错误? [英] A network error in Phonegap on Android?
本文介绍了在Android上的PhoneGap的网络错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我得到这个错误。我该怎么办?
路径是有效的,我已经检查了它。我做了一个干净,再次重建应用程序,等等。我真的不知道下一步该怎么做!
The path is valid and I've checked it. And I've made a clean and rebuilt the app again, and so forth. I really don't know what to do next!
在我的活动课,我有以下code:
In my activity class I have the following code:
import android.app.Activity;
import android.os.Bundle;
import org.apache.cordova.*;
public class TestPhoneGapActivity extends DroidGap {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// setContentView(R.layout.main);
String url = "file:///assets/www/index.html";
super.loadUrl(url);
}
}
推荐答案
我有这个问题,我固定它这样的..
i had this problem and i fixed it like this..
super.loadUrl("file:///android_asset/www/index.html");
到
super.loadUrl("file:///android_asset/www/index.htm");
这篇关于在Android上的PhoneGap的网络错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文