当另一个应用程序从它打开时,活动被破坏,以不同的方向打开(android)

时间:2014-05-23 05:44:22

标签: android android-orientation android-screen-support

我正在开发一个具有固定方向(横向)的平板电脑应用程序,我在其中从图库导入图像..当我打开图库并从中选择图像时,我的应用程序崩溃......

仅在这种情况下,当我的设备以纵向方向固定时,才会发生这种情况。 解决我在manifest.xml中包含以下行

android:configChanges="keyboardHidden|orientation|screenSize"

但仍然无法解决我的问题...

这里是logcat

05-23 10:52:36.644: E/AndroidRuntime(21357): FATAL EXCEPTION: main
05-23 10:52:36.644: E/AndroidRuntime(21357): Process: com.liam.simplereflect, PID: 21357
05-23 10:52:36.644: E/AndroidRuntime(21357): java.lang.RuntimeException: Unable to start           activity ComponentInfo{com.liam.simplereflect/com.liam.simplereflect.General}:  java.lang.RuntimeException: You must call Parse.initialize(context, oauthKey, oauthSecret) before using the Parse library.
05-23 10:52:36.644: E/AndroidRuntime(21357):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
05-23 10:52:36.644: E/AndroidRuntime(21357):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
05-23 10:52:36.644: E/AndroidRuntime(21357):    at android.app.ActivityThread.access$800(ActivityThread.java:135)
05-23 10:52:36.644: E/AndroidRuntime(21357):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
05-23 10:52:36.644: E/AndroidRuntime(21357):    at android.os.Handler.dispatchMessage(Handler.java:102)
05-23 10:52:36.644: E/AndroidRuntime(21357):    at android.os.Looper.loop(Looper.java:136)
05-23 10:52:36.644: E/AndroidRuntime(21357):    at android.app.ActivityThread.main(ActivityThread.java:5017)
05-23 10:52:36.644: E/AndroidRuntime(21357):    at java.lang.reflect.Method.invokeNative(Native Method)
05-23 10:52:36.644: E/AndroidRuntime(21357):    at java.lang.reflect.Method.invoke(Method.java:515)
05-23 10:52:36.644: E/AndroidRuntime(21357):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
05-23 10:52:36.644: E/AndroidRuntime(21357):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
05-23 10:52:36.644: E/AndroidRuntime(21357):    at dalvik.system.NativeStart.main(Native Method)
05-23 10:52:36.644: E/AndroidRuntime(21357): Caused by: java.lang.RuntimeException: You must call Parse.initialize(context, oauthKey, oauthSecret) before using the Parse library.
05-23 10:52:36.644: E/AndroidRuntime(21357):    at com.parse.ParseUser.checkApplicationContext(ParseUser.java:1041)
05-23 10:52:36.644: E/AndroidRuntime(21357):    at com.parse.ParseUser.getCurrentUser(ParseUser.java:842)
05-23 10:52:36.644: E/AndroidRuntime(21357):    at com.parse.ParseQuery.findAsync(ParseQuery.java:520)
05-23 10:52:36.644: E/AndroidRuntime(21357):    at com.parse.ParseQuery.find(ParseQuery.java:516)
05-23 10:52:36.644: E/AndroidRuntime(21357):    at com.liam.simplereflect.General.getChildren_names_and_ids(General.java:1043)
05-23 10:52:36.644: E/AndroidRuntime(21357):    at com.liam.simplereflect.General.onCreate(General.java:268)
05-23 10:52:36.644: E/AndroidRuntime(21357):    at android.app.Activity.performCreate(Activity.java:5231)
05-23 10:52:36.644: E/AndroidRuntime(21357):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
05-23 10:52:36.644: E/AndroidRuntime(21357):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
05-23 10:52:36.644: E/AndroidRuntime(21357):    ... 11 more

0 个答案:

没有答案