downgrade libs and change code to fit android libs