有时,我的应用程序被冻结,然后崩溃.
我读了系统日志,在系统日志的最后几行,我在Activity上看到了一些错误"WIN DEATH".
有人可以告诉我原因并告诉我解决方案吗?
非常感谢!
这是系统日志:
08-17 08:34:00.091 E/WifiService( 149): ***WAPI : readNetworkVariables testing for WAPI
08-17 08:34:00.101 E/WifiService( 149): ***WAPI : readNetworkVariables testing for WAPI
08-17 08:34:00.101 E/WifiService( 149): ***WAPI : readNetworkVariables testing for WAPI
08-17 08:34:00.111 E/WifiService( 149): ***WAPI : readNetworkVariables testing for WAPI
08-17 08:34:00.121 E/WifiService( 149): ***WAPI : readNetworkVariables testing for WAPI
08-17 08:34:00.131 E/WifiService( 149): ***WAPI : readNetworkVariables testing for WAPI
08-17 08:34:00.131 E/WifiService( 149): ***WAPI : readNetworkVariables testing for WAPI
08-17 08:34:00.141 E/WifiService( 149): …
Run Code Online (Sandbox Code Playgroud) 我想在Android Honeycomb上获得真正的屏幕分辨率.
这是我的代码
Display display = getWindowManager().getDefaultDisplay();
int w = display.getWidth();
int h = display.getHeight();
Run Code Online (Sandbox Code Playgroud)
我的设备是Asus Transformer TF101,尺寸为1280x800.
但是上面的代码使w = 1280和h = 752(我想要的是800而不是752).
我知道h <800因为它被减去状态栏.
有办法获得真正的屏幕高度吗?
非常感谢!
尝试访问类中的静态函数时遇到错误Java.lang.error.
class Global
{
public Global(){}
public static void Init()
{
//doing something
}
}
Run Code Online (Sandbox Code Playgroud)
我在这里使用Global类:
public class MyApp extends UiApplication
{
public static void main(String[] args)
{
MyApp app = new MyApp ();
app.enterEventDispatcher();
}
public MyApp ()
{
//invoke
Global.Init(); //throw Java.lang.error
}
}
Run Code Online (Sandbox Code Playgroud)
每当我访问类Global中的任何静态属性时,都会抛出该错误.