Android Question b4ACarouselViewNew error

H.L.M. Feijen

Member
Licensed User
Longtime User
Johan Schoeman's b4ACarouselViewNew works fine with my B4A 6.80 and jdk1.8.0_131. It also behaves nicely when I use my own set of .png's in stead of his. But, if I write a new app in b4A from scratch and I use the b4ACarouselViewNew libs (jar and xml) I get this error in the logs: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:166) at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)..etc Any ideas how to fix this? Thx Hans
 

Johan Schoeman

Expert
Licensed User
Longtime User
Johan Schoeman's b4ACarouselViewNew works fine with my B4A 6.80 and jdk1.8.0_131. It also behaves nicely when I use my own set of .png's in stead of his. But, if I write a new app in b4A from scratch and I use the b4ACarouselViewNew libs (jar and xml) I get this error in the logs: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:166) at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)..etc Any ideas how to fix this? Thx Hans
Hans, can you post a sample of your new project?
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

Johan Schoeman

Expert
Licensed User
Longtime User
Hi Johan,

Hope this is enough for you!

Hans
Look in the /Objects/res folder of the project that I haver posted. There are sub folders with files. Do you have these folders in your B4A project? The files in these sub folders must all be set to READ ONLY before you compile your B4A project else they will automatically be deleted.

The other option is to extract the attached zip folder and to copy the folder and its contents to be on the same folder level as that of the /Objects and /Files folders of the B4A project.Then add the reference to LibRes in your code as follows:

B4X:
#Region  Project Attributes
    #ApplicationLabel: CarouselViewNew
    #VersionCode: 1
    #VersionName:
    'SupportedOrientations possible values: unspecified, landscape or portrait.
    #SupportedOrientations: portrait
    #CanInstallToExternalStorage: False
#End Region

#AdditionalRes: ..\LibRes


#Region  Activity Attributes
    #FullScreen: True
    #IncludeTitle: True
#End Region

You then don't have to worry about setting the READ ONLY property of the files
 

Attachments

  • LibRes.zip
    7.8 KB · Views: 174
Last edited:
Upvote 0

H.L.M. Feijen

Member
Licensed User
Longtime User
Already tried the IDE zip. It produced >900k file!? Upload not possible. I will look into your last post asap. Keep you posted. Thx again. Hans.
 
Upvote 0

H.L.M. Feijen

Member
Licensed User
Longtime User
Hi Johan,
My layout and values files were empty. Copied the missing files from your original b4ACarouselNew lib. They are all set to read only. Without using #AdditionalRes: the app works fine now in debug and release mode. Many thanks! Hans.
 
Upvote 0
Top