0

我正在从事 Phonegap 项目。一切正常。当我想旋转现有的屏幕应用程序并出现异常时

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 没用

任何人都可以帮助我。

4

0 回答 0