在android上:應用程序有時會給出[應用程序錯誤]存在網絡錯誤(file:// /android_asset/www/index.html)。IBM Worklight 6.1 [應用程序錯誤]出現網絡錯誤(file:///android_asset/www/index.html)
在其他人的搜索答案但沒有工作。
下面是我Appname.js路徑:
的Android /本地/ src目錄/通用/ APPNAME/Appname.java
public class appName extends WLDroidGap {
@Override
public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
}
/**
* onWLInitCompleted is called when the Worklight runtime framework initialization is complete
*/
@Override
public void onWLInitCompleted(Bundle savedInstanceState){
super.loadUrl(getWebMainFilePath());
// Add custom initialization code after this line
}
}
我怎樣才能做到這一點?
什麼時候顯示錯誤?莫名其妙地影響你的代碼?另外,您是在啓動時連接到服務器,還是在連接到服務器時的任何時候?如果是這樣,你有從設備/模擬器到服務器的網絡訪問嗎? 此外,你粘貼你的Appname.java,除非你從那個文件中得到一個特定的Android錯誤,它是沒用的,我想你的意思是顯示main.js文件。 最後,您是否使用從6.1之前升級的應用程序或6.1中創建的應用程序? –