Wednesday, April 23, 2014

Html5 with android studio will be packaged into apk


The webview with android studio will html5 package,
public class MainActivity extends ActionBarActivity {
private WebView webview;
@ Override
protected void onCreate (Bundle savedInstanceState) {
super.onCreate (savedInstanceState);
/ / Set the Web View
setContentView (R.layout.activity_main);
/ / Instantiate an object
WebViewwebview = (WebView) findViewById (R.id.webView);
/ / Set the WebView properties, able to execute Javascript script
webview.getSettings () setJavaScriptEnabled (true);.
/ / Load the page to be displayed
webview.loadUrl ("http://192.168.0.137:802/PhoneTasks/Login.htm");
}
Can not open the specified web page after installation
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
That should be http://192.168.0.137:802/PhoneTasks/Login.htm this page does not open it. . .
Reply:
This page can be opened in Azerbaijan, directly in the browser can open
this page
Reply:

192.168.0.137 LAN okay.
Reply:
Well, but my phone is connected to the network Ah, I use Baidu's address also Rom
Reply:
Question authority or blocked by security software
Reply:
Check the log to see what is wrong, there is no authority?
Reply:
How to set permissions before I touch android, that do not understand
Reply:
AndroidManifest.xml permissions have been set , or open web pages, experts hope to answer A

No comments:

Post a Comment