Android Question Still having a compile error

gruizelgruis

Member
Licensed User
Longtime User
Goodmornig,
After updating I followed these instructions:

B4A – The simple way to develop native Android apps (b4x.com)

To get rid of this error:
Linking resources Error
unknown option '-A'.
aapt2 link [options] -o arg --manifest arg files...

I am running into this error.

applied to given types;
mostCurrent._pager.Initialize(mostCurrent.activityBA,mostCurrent._container,"Pager");
^
required: BA,String
found: BA,AHPageContainer,String
reason: actual and formal argument lists differ in length

It points to this line in teh code
B4X:
    pager.Initialize(container, "Pager")

I am using the AHViewPager version 3

please advice
 

gruizelgruis

Member
Licensed User
Longtime User
The first error suggests that your SDK is misconfigured. Can you post a screenshot of the paths configuration dialog?
1619944507907.png
 
Upvote 0

gruizelgruis

Member
Licensed User
Longtime User
We've already gone through this with you!
Compil error | B4X Programming Forum
Why are you still using an old SDK?

Finaly I managed to get "android-30" installed. THX

However it still wil not compile.
So I tried to compile the attached example
And that gives me the saem error

B4A line: 45
Container.Initialize
src\com\viewpager\com\main.java:409: error: cannot access PagerAdapter
mostCurrent._container.Initialize(mostCurrent.activityBA);
^
class file for androidx.viewpager.widget.PagerAdapter not found
 

Attachments

  • ViewPagerSample.zip
    7.7 KB · Views: 198
Last edited:
Upvote 0

agraham

Expert
Licensed User
Longtime User
This?
AHViewPager library - Sliding panels now perfect | B4X Programming Forum
Attention: V2.20 has an API change which makes the ViewPager incompatible with older versions. The AHPageContainer parameter is removed from the Initialize() method. Initialize2() has the old signature. If you use Initialize() (or add the View to the Designer as a custom view) then you have to set the container object with ViewPager.PageContainer = <YourContainer>
 
Upvote 0
Top