Wednesday, July 22, 2015

Android Studio: Ill-advised or mistaken usage of a core class (java.* or javax.*)

Adding xmlrpc-client library to the application
                               compile 'org.apache.xmlrpc:xmlrpc-client:3.1.3'
causes the following error during run:
trouble processing "javax/xml/parsers/DocumentBuilder.class":
Ill-advised or mistaken usage of a core class (java.* or javax.*)


DocumentBuilder is already included in android. So we should exclude xml-apis in gradle:

compile ('org.apache.xmlrpc:xmlrpc-client:3.1.3') {
    exclude group: 'xml-apis'
}

Wednesday, July 15, 2015

Livejournal XML-RPC anonymous access

The question about anonymous access (i.e. read posts and comments without authorization) is often raised during development applications using XML-RPC interface. Livejournal protocol is poorly documented and it is not obvious how to implement that. However source code is available and could help to clarify some issues (LiveJournal Server Source Code (stale history from before it went closed-source) (https://github.com/apparentlymart/livejournal). The ljprotocol.pl file is of interest to us.

Friday, July 10, 2015

Android Studio: Android application with Java library

This is a short guide how to set up Android Studio for developing Android Applications that depend on the Java library.

Add Java library to the Android application

 Add new module using File -> New -> New module