Q:

How to include two libraries of different versions in Android

For the sence of backward compatibility I need to include two versions of the same barcode reading lib in my App. 
For barcodes of old format I will use the old lib. 
For barcodes of new format I will use the new lib.
Problem:
The classes in both libs have the same names. 
Question:
What is the best way to include both libs in my App without a name clash?
What I tried: 
I tried to create two lib-projects - one for each lib. I tried to forbid direct access to the libs by using Build Path Access Rules - but the App still sees both libs.

A:

I assume you do not have the source code for this lib, correct?
Having source code:
You should build one library that supports both, old and new format.
Having libs but no source:
This is only possible if you use a custom ClassLoader. Check this for an example.

