0

有人要求我继续开发移动应用程序,应用程序使用b4a, my J-D-K版本是1.8,数据库是p-o-s-t-g-r-e-S-Q-L,服务器l-o-c-a-l-h-o-s-t在我的PC上,我尝试应用程序的设备是三星,但是我有一个问题使我无法运行应用程序,首先当我尝试通过三星登录时,它卡住了,无法停止加载,但是当我尝试时X-I-A-O-M-I,加载成功但错误时l-o-a-d-l-a-y-o-u-t-("main"),这是​​什么问题?有人能帮我吗 ?

这是出现错误的代码 Sub Activity_Create(FirstTime As Boolean) If Starter.login=False Then StartActivity(pagelogin) Activity.Finish Else DateTime.DateFormat = "yyyy-MM-dd" tanggal = DateTime.Date(DateTime.Now) NowNav=1 Activity.LoadLayout("main") ActionBar.SetAsActionBar ActionBar.InitMenuListener ActionBar.Title = "Smart Campus" ActionBar.SubTitle = "Tenaga Pengajar" BuildNavigationDrawer Homenya id_gedung.Initialize Timer1.Initialize("Timer1", 1000) Timer1.Enabled = True End If

错误是 ** Activity (main) Pause, UserClosed = false ** ** Service (starter) Create ** ** Service (starter) Start ** ** Activity (main) Create, isFirst = true ** ** Activity (main) Resume ** ** Activity (main) Pause, UserClosed = true ** ** Service (httputils2service) Create ** ** Service (httputils2service) Start ** ** Service (httputils2service) Start ** ** Activity (pagelogin) Create, isFirst = true ** ** Activity (pagelogin) Resume ** ** Activity (pagelogin) Pause, UserClosed = true ** ** Activity (main) Create, isFirst = false ** Error occurred on line: 131 (Main) java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:166) at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:208) at wanda.absen.main._activity_create(main.java:546) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:702) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:339) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:246) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134) at wanda.absen.main.afterFirstLayout(main.java:102) at wanda.absen.main.access$000(main.java:17) at wanda.absen.main$WaitForLayout.run(main.java:80) at android.os.Handler.handleCallback(Handler.java:754) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:163) at android.app.ActivityThread.main(ActivityThread.java:6205) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794) Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.objects.CustomViewWrapper.AfterDesignerScript(CustomViewWrapper.java:64) at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:158) ... 18 more Caused by: java.lang.NoSuchFieldError: No field abc_text_cursor_material of type I in class Landroid/support/v7/appcompat/R$drawable; or its superclasses (declaration of 'android.support.v7.appcompat.R$drawable' appears in /data/app/wanda.absen-1/base.apk) at android.support.v7.internal.widget.TintManager.<clinit>(TintManager.java:90) at android.support.v7.internal.widget.TintManager.get(TintManager.java:154) at android.support.v7.internal.widget.TintTypedArray.getTintManager(TintTypedArray.java:192) at android.support.v7.internal.widget.TintTypedArray.getDrawable(TintTypedArray.java:62) at android.support.v7.widget.Toolbar.<init>(Toolbar.java:265) at android.support.v7.widget.Toolbar.<init>(Toolbar.java:207) at android.support.v7.widget.Toolbar.<init>(Toolbar.java:203) at de.amberhome.objects.appcompat.ACToolbarDarkWrapper.innerInitialize(ACToolbarDarkWrapper.java:27) at anywheresoftware.b4a.objects.ViewWrapper.Initialize(ViewWrapper.java:65) at de.amberhome.objects.appcompat.ACToolBarWrapper.Initialize(ACToolBarWrapper.java:45) at de.amberhome.objects.appcompat.ACToolBarWrapper._initialize(ACToolBarWrapper.java:77) ... 21 more ** Activity (main) Resume ** ** Activity (main) Resume ** ** Activity (main) Pause, UserClosed = false **

4

1 回答 1

0
Sub Activity_Create(FirstTime As Boolean)
If Starter.login=False Then
    StartActivity(pagelogin)
    Activity.Finish
Else
    DateTime.DateFormat = "yyyy-MM-dd"
    tanggal = DateTime.Date(DateTime.Now)
    NowNav=1
    Activity.LoadLayout("main")
    ActionBar.SetAsActionBar
    ActionBar.InitMenuListener
    ActionBar.Title = "Smart Campus"
    ActionBar.SubTitle = "Tenaga Pengajar"
    BuildNavigationDrawer
    Homenya
    id_gedung.Initialize
    Timer1.Initialize("Timer1", 1000)
    Timer1.Enabled = True
End If

结束子

于 2018-02-20T20:51:53.373 回答