应用程序仅适用于模拟器

时间:2013-12-05 20:09:09

标签: android eclipse web-applications

下午好,我正在为Android开发一个简单的webapp,它在Eclipse模拟器中运行得很好,但是当我导出时。 Apk我无法安装在手机上。

显示“不支持的格式”。

以下代码:

<?xml version="1.0" encoding="utf-8"?>
    <WebView  xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/webview"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
/>

package com.example.provincia;

import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;

public class MainActivity extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);

    WebView myWebView = (WebView) findViewById(R.id.webview);
    myWebView.loadUrl("http://www.*****.com.br/sites/webapp/index.php");


    WebSettings webSettings = myWebView.getSettings();
    webSettings.setJavaScriptEnabled(true);
    myWebView.getSettings().setDomStorageEnabled(true); 

    myWebView.setWebViewClient(new WebViewClient());
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.main, menu);
    return true;
}

}

logcat的:

12-05 18:19:30.092: E/Zygote(32): setreuid() failed. errno: 2
12-05 18:19:45.793: E/Zygote(32): setreuid() failed. errno: 17
12-05 18:19:47.603: E/BatteryService(58): usbOnlinePath not found
12-05 18:19:47.603: E/BatteryService(58): batteryVoltagePath not found
12-05 18:19:47.603: E/BatteryService(58): batteryTemperaturePath not found
12-05 18:19:47.634: E/SurfaceFlinger(58): Couldn't open /sys/power/wait_for_fb_sleep or               /sys/power/wait_for_fb_wake
12-05 18:20:01.732: E/EventHub(58): could not get driver version for /dev/input/mouse0,      Not a typewriter
12-05 18:20:01.732: E/EventHub(58): could not get driver version for /dev/input/mice, Not a typewriter
12-05 18:20:02.067: E/System(58): Failure starting core service
12-05 18:20:02.067: E/System(58): java.lang.SecurityException
12-05 18:20:02.067: E/System(58):   at android.os.BinderProxy.transact(Native Method)
12-05 18:20:02.067: E/System(58):   at     android.os.ServiceManagerProxy.addService(ServiceManagerNative.java:146)
12-05 18:20:02.067: E/System(58):   at android.os.ServiceManager.addService(ServiceManager.java:72)
12-05 18:20:02.067: E/System(58):   at     com.android.server.ServerThread.run(SystemServer.java:184)
12-05 18:20:03.542: E/SoundPool(58): error loading /system/media/audio/ui/Effect_Tick.ogg
12-05 18:20:03.573: E/SoundPool(58): error loading /system/media/audio/ui/KeypressStandard.ogg
12-05 18:20:03.573: E/SoundPool(58): error loading /system/media/audio/ui/KeypressSpacebar.ogg
12-05 18:20:03.573: E/SoundPool(58): error loading /system/media/audio/ui/KeypressDelete.ogg
12-05 18:20:03.594: E/SoundPool(58): error loading /system/media/audio/ui/KeypressReturn.ogg
12-05 18:20:07.282: E/ThrottleService(58): Could not open GPS configuration file /etc/gps.conf
12-05 18:20:08.246: E/logwrapper(140): executing /system/bin/tc failed: No such file or directory
12-05 18:20:08.342: E/logwrapper(142): executing /system/bin/tc failed: No such file or directory
12-05 18:20:08.412: E/logwrapper(143): executing /system/bin/tc failed: No such file or directory
12-05 18:20:26.059: E/HierarchicalStateMachine(58): TetherMaster - unhandledMessage: msg.what=3

0 个答案:

没有答案