Android Question New 9.3 - Switch to Android X - class file for android.support.v4.view.PagerAdapter not found

Status
Not open for further replies.

Micholl

Member
Licensed User
Longtime User
Hello all,

I apologize for having to raise this issue again, but unfortunately the answers
I've found in the forum given have not helped me :( .

I have made a new installation as described online for B4A 9.3 and made
those steps for switching to Android X. But unfortunately I can't get my
projects compiled.

B4X:
B4A Version: 9.30
Java Version: 8
Parse den Code.    (0.15s)
Building folders structure.    (0.01s)
Kompiliere den Code.    (0.76s)
Kompiliere Layoutcode.    (0.11s)
Organisiere Libraries.    (0.00s)
    (AndroidX SDK)
Generiere R Datei.    (0.48s)
Kompiliere Debugger-Code    (2.54s)
Kompiliere generierten Java Code.    Error
B4A line: 428
container.Initialize
javac 1.8.0_221
src\de\apsdelta\android\apprm602\main.java:1068: error: cannot access PagerAdapter
parent.mostCurrent._container.Initialize(mostCurrent.activityBA);
                             ^
  class file for android.support.v4.view.PagerAdapter not found


What have I tried so far:
- Android SDK in B4A - checked that I have all downloads.
- Jetifier says: Nothing to do (I had already run that).
- Clean Project.
- Tried multiple suggestions with #AdditionalJar to add support-v4.jar.
- Searched for com.android.support:support-v4 which was not installed
and downloaded this among other matching "com.android.support".

Unfortunately, all this did not change the error message.

I'm sure I miss something and I'm the one not getting it. I mean it lacks
a reference or a lib but I do not know where to start anymore.

Any help or tip would be great!

Micholl
 

Micholl

Member
Licensed User
Longtime User
Hello Erel,

I apologize for the late reply. I was at least a few days on vacation.

Where is AHPageViewer library located? Open the internal libraries folder and make sure that it is NOT there.

Darn :eek:. AHPageViewer was indeed in the internal libraries folder (with 4 others).

Moved to correct position and compiled afterwards without problems with AndroidX.

My mistake, thank you very much for the help!

Micholl
 
Upvote 0

gruizelgruis

Member
Licensed User
Longtime User
Goodmornig, i'm having theh same problem. After upgrading to B4A 10.70
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...

My app relies on AHViewPager.
- if the " internal libraries folder " is @ "Anywhere Software\Basic4android\Libraries" then there are no 'AHViewPager' files located in the folder
Please advice
 
Upvote 0
Status
Not open for further replies.
Top