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!
在我的活动类中,我有以下代码:
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);
}
}
推荐答案
我有这个问题, this ..
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屋!
查看全文