f0raster0 Well-Known Member Licensed User Longtime User Apr 15, 2020 #1 Hi Guys, I just bought a new laptop last year.. today want to work with this AppCompat, then I download this example: AppCompat with ToolBar - minimal example In most cases AppCompat is no longer needed and will only make things more complicated. B4XPages example with dynamic menu: https://www.b4x.com/android/forum/threads/b4x-menu-badges.133301/ The project attached uses the powerful AppCompat library to replace the built-in ActionBar with a... www.b4x.com I think I read in somewhere about configuration of java or so don't remember.. anyway when i try to run the example I got this error: B4X: Error occurred on line: 25 (Main) java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:170) at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209) at b4a.example12.main._activity_create(main.java:385) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144) at b4a.example12.main.afterFirstLayout(main.java:104) at b4a.example12.main.access$000(main.java:17) at b4a.example12.main$WaitForLayout.run(main.java:82) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7076) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965) 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:162) ... 18 more Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/widget/Toolbar; at java.lang.Class.classForName(Native Method) at java.lang.Class.forName(Class.java:453) at java.lang.Class.forName(Class.java:378) at anywheresoftware.b4a.shell.Shell.getCorrectClassName(Shell.java:624) at anywheresoftware.b4a.shell.Shell.createObject(Shell.java:611) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:366) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255) **** I'm using B4A 9.5 at the moment testing with Smartphone Android 9 C:\java\jdk-11.0.1\jdk-11.0.1\bin\javac.exe C:\Android\platforms\android-28\android.jar Edit: I found the tutorial.. AppCompat - Make Material Design apps compatible with older Android versions This library is a wrapper for the Google AppCompat v7 support library. B4A V6.0 or newer is required! From V3.52 on B4A V6.80 or newer is required! If you still use B4A < V6.80, use V3.51 of this library. The main reason for this library is to make your apps compatible with older Android... www.b4x.com Last edited: Apr 15, 2020
Hi Guys, I just bought a new laptop last year.. today want to work with this AppCompat, then I download this example: AppCompat with ToolBar - minimal example In most cases AppCompat is no longer needed and will only make things more complicated. B4XPages example with dynamic menu: https://www.b4x.com/android/forum/threads/b4x-menu-badges.133301/ The project attached uses the powerful AppCompat library to replace the built-in ActionBar with a... www.b4x.com I think I read in somewhere about configuration of java or so don't remember.. anyway when i try to run the example I got this error: B4X: Error occurred on line: 25 (Main) java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:170) at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209) at b4a.example12.main._activity_create(main.java:385) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255) at java.lang.reflect.Method.invoke(Native Method) at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144) at b4a.example12.main.afterFirstLayout(main.java:104) at b4a.example12.main.access$000(main.java:17) at b4a.example12.main$WaitForLayout.run(main.java:82) at android.os.Handler.handleCallback(Handler.java:873) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7076) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:965) 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:162) ... 18 more Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/widget/Toolbar; at java.lang.Class.classForName(Native Method) at java.lang.Class.forName(Class.java:453) at java.lang.Class.forName(Class.java:378) at anywheresoftware.b4a.shell.Shell.getCorrectClassName(Shell.java:624) at anywheresoftware.b4a.shell.Shell.createObject(Shell.java:611) at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:366) at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255) **** I'm using B4A 9.5 at the moment testing with Smartphone Android 9 C:\java\jdk-11.0.1\jdk-11.0.1\bin\javac.exe C:\Android\platforms\android-28\android.jar Edit: I found the tutorial.. AppCompat - Make Material Design apps compatible with older Android versions This library is a wrapper for the Google AppCompat v7 support library. B4A V6.0 or newer is required! From V3.52 on B4A V6.80 or newer is required! If you still use B4A < V6.80, use V3.51 of this library. The main reason for this library is to make your apps compatible with older Android... www.b4x.com
DonManfred Expert Licensed User Longtime User Apr 15, 2020 #2 f0raster0 said: I'm using B4A 9.5 at the moment testing with Smartphone Android 9 C:\java\jdk-11.0.1\jdk-11.0.1\bin\javac.exe C:\Android\platforms\android-28\android.jar Click to expand... no reason to use 9.5. Update to 9.8; it is free Follow the installation instructions. B4A – The simple way to develop native Android apps B4A includes all the features needed to quickly develop any type of Android app. B4A is used by tens of thousands of developers from all over the world, including companies such as NASA, HP, IBM and others. www.b4x.com It will just work. Upvote 0
f0raster0 said: I'm using B4A 9.5 at the moment testing with Smartphone Android 9 C:\java\jdk-11.0.1\jdk-11.0.1\bin\javac.exe C:\Android\platforms\android-28\android.jar Click to expand... no reason to use 9.5. Update to 9.8; it is free Follow the installation instructions. B4A – The simple way to develop native Android apps B4A includes all the features needed to quickly develop any type of Android app. B4A is used by tens of thousands of developers from all over the world, including companies such as NASA, HP, IBM and others. www.b4x.com It will just work.
f0raster0 Well-Known Member Licensed User Longtime User Apr 15, 2020 #3 DonManfred said: no reason to use 9.5. Update to 9.8; it is free Click to expand... it's not important if is free or no. Sometime is better to keep the version that is working and update later when we have extra free time (just in case) I think I can solve it following the tutorial. Anyway, thanks @DonManfred Look like I have to do that: App crash "java.lang.NoClassDefFoundError: Failed resolution v4" in sdk update Hi, I updated to SDK 10 in b4a 9.5 and now get error. #Extends: android.support.v7.app.AppCompatActivity #AdditionalJar: com.android.support:support-v4 i have installed v4 version and it still gives me the same error. Any idea? #Region Project Attributes #ApplicationLabel: B4A Example... www.b4x.com Last edited: Apr 15, 2020 Upvote 0
DonManfred said: no reason to use 9.5. Update to 9.8; it is free Click to expand... it's not important if is free or no. Sometime is better to keep the version that is working and update later when we have extra free time (just in case) I think I can solve it following the tutorial. Anyway, thanks @DonManfred Look like I have to do that: App crash "java.lang.NoClassDefFoundError: Failed resolution v4" in sdk update Hi, I updated to SDK 10 in b4a 9.5 and now get error. #Extends: android.support.v7.app.AppCompatActivity #AdditionalJar: com.android.support:support-v4 i have installed v4 version and it still gives me the same error. Any idea? #Region Project Attributes #ApplicationLabel: B4A Example... www.b4x.com
Erel B4X founder Staff member Licensed User Longtime User Apr 15, 2020 #4 Big mistake to use an older version. There isn't a single advantage of using v9.50 over v9.80 and their are bug fixes and other improvements in v9.80 that you will miss. Upvote 0
Big mistake to use an older version. There isn't a single advantage of using v9.50 over v9.80 and their are bug fixes and other improvements in v9.80 that you will miss.
f0raster0 Well-Known Member Licensed User Longtime User Apr 15, 2020 #5 Note: 9.8 doesn't solve the problem with that example.. Solution: [B4X] B4XDrawer - sliding drawer Edit: Cross platform example based on B4XPages https://www.b4x.com/android/forum/threads/b4x-b4xpages-b4xdrawer.120246/ A class that implements a sliding menu. Unlike the nice jfeinstein SlidingMenu library the drawer covers the activity instead of pushing it. It is similar to the various... www.b4x.com Last edited: Apr 15, 2020 Upvote 0
Note: 9.8 doesn't solve the problem with that example.. Solution: [B4X] B4XDrawer - sliding drawer Edit: Cross platform example based on B4XPages https://www.b4x.com/android/forum/threads/b4x-b4xpages-b4xdrawer.120246/ A class that implements a sliding menu. Unlike the nice jfeinstein SlidingMenu library the drawer covers the activity instead of pushing it. It is similar to the various... www.b4x.com