SetScreenOrientation crash my app

danoptic

Member
Licensed User
Longtime User
The aplication crash each time I m trying to change the screen orientation to landscape. The application is in portrait miode an I need to take a icture usind th landscape mode.

the code:
Sub Globals
Dim phnPhone As Phone

Sub Activity_Resume
phnPhone.SetScreenOrientation(0)

the error message:

InsertMaps (first query out of 5): INSERT INTO [LensColor] ([Id], [LensTypeID], [LensColor]) VALUES (?, ?, ?)
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (takepicture) Create, isFirst = true **
** Activity (takepicture) Resume **
takepicture_activity_resume (B4A line: 58)
phnPhone.SetScreenOrientation(0)
java.lang.NoSuchFieldError: anywheresoftware.b4a.BA.activityBA
at anywheresoftware.b4a.phone.Phone.SetScreenOrientation(Phone.java:192)
at danoptic.custcliptest.takepicture._activity_resume(takepicture.java:309)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:170)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:154)
at danoptic.custcliptest.takepicture.afterFirstLayout(takepicture.java:90)
at danoptic.custcliptest.takepicture.access$100(takepicture.java:16)
at danoptic.custcliptest.takepicture$WaitForLayout.run(takepicture.java:72)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
at dalvik.system.NativeStart.main(Native Method)


THanks for the help
Dan:sign0085:
 

gapi

Active Member
Licensed User
Longtime User
I too have a similar problem: (same application since I compiled with version 2.02 of B4A me back this error:
....
java.lang.NoSuchFieldError: anywheresoftware.b4a.BA.activityBA
at anywheresoftware.b4a.agraham.reflection.Reflection.GetActivity(Reflection.java:638)
at abacus.gapi.promoterstart._button1_click(promoterstart.java:269)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:170)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:158)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:154)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:54)
at android.view.View.performClick(View.java:2485)
at android.view.View$PerformClick.run(View.java:9080)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
at dalvik.system.NativeStart.main(Native Method)



why ? :confused:
 
Last edited:
Upvote 0
Top