Java Question import android.support.v4.view.ViewCompat;

DonManfred

Expert
Licensed User
Longtime User
probably inside this files... i copied them from the google maven repos
https://www.dropbox.com/s/gltxwjg13a8yiwn/libscompat.zip?dl=0

You need them just in eclipse to reference them...

Insde your wrapper you should add a dependson to support-v4
B4X:
@DependsOn(values={"com.android.support:support-v4"})
 

Johan Schoeman

Expert
Licensed User
Longtime User

Johan Schoeman

Expert
Licensed User
Longtime User
It you are talking about https://android-arsenal.com/details/1/6142

i put all files together in eclipse.
after i added support-compat-25.3.1.jar the import can be resolved.
Note that i am using android.jar from api 25
Yes Manfred - that is exactly the one that I am trying to compile. I do have support-compat-25.3.1.jar in my libs folder but I keep on getting this error when I try to compile the library. I am lost and confused like a chameleon in a box of Smarties.....
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
You can let the IDE create the jar from the maven artifacts.

Create a new project and add this line:
B4X:
#AdditionalJar: com.android.support:support-v4
Run the project.

A jar file named Objects\bin\extra\stan.jar will be created.
You can use this jar in your Eclipse project. It will include ViewCompat.SetBackground if your maven repositories are updated.

Edit: this method no longer works as the compiler is more sophisticated now and doesn't need to create this jar.
 
Last edited:
Top