获取异常致命异常:未附加PhoneGap应用程序的视图

时间:2013-05-23 10:08:26

标签: android cordova

我正在开发Phonegap项目。一切正常。当我想旋转屏幕App现有并获得异常

E/AndroidRuntime( 4068): FATAL EXCEPTION: main
E/AndroidRuntime( 4068): java.lang.IllegalArgumentException: View not attached to window manager
E/AndroidRuntime( 4068):    at android.view.WindowManagerImpl.findViewLocked(WindowManagerImpl.java:587)
E/AndroidRuntime( 4068):    at android.view.WindowManagerImpl.removeView(WindowManagerImpl.java:324)
E/AndroidRuntime( 4068):    at android.view.WindowManagerImpl$CompatModeWrapper.removeView(WindowManagerImpl.java:151)
E/AndroidRuntime( 4068):    at android.app.Dialog.dismissDialog(Dialog.java:328)
E/AndroidRuntime( 4068):    at android.app.Dialog$1.run(Dialog.java:119)
E/AndroidRuntime( 4068):    at android.app.Dialog.dismiss(Dialog.java:313)
E/AndroidRuntime( 4068):    at org.apache.cordova.DroidGap.removeSplashScreen(DroidGap.java:970)
E/AndroidRuntime( 4068):    at org.apache.cordova.DroidGap$5$1.run(DroidGap.java:1013)
E/AndroidRuntime( 4068):    at android.os.Handler.handleCallback(Handler.java:605)
E/AndroidRuntime( 4068):    at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime( 4068):    at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 4068):    at android.app.ActivityThread.main(ActivityThread.java:4424)
E/AndroidRuntime( 4068):    at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 4068):    at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 4068):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
E/AndroidRuntime( 4068):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
E/AndroidRuntime( 4068):    at dalvik.system.NativeStart.main(Native Method)

我已经给了

android:configChanges="orientation|keyboardHidden|screenLayout"

我的活动代码

public class MyPhoneGapActivity extends DroidGap {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //super.setIntegerProperty("loadUrlTimeoutValue", 60000);

        super.setIntegerProperty("splashscreen", R.drawable.splash);
        super.loadUrl("file:///android_asset/www/index.html", 60000);
    }

}

到我的Activity.but没有用

任何人都可以帮助我。

0 个答案:

没有答案