[slf4j-user] Problem with SLF4J and Android

Thorbjoern Ravn Andersen ravn at runjva.com
Sat Jul 11 14:41:32 CEST 2009


Max Braun skrev:
> Does someone have an idea where I could go from here?
>
> Am 03.07.2009 um 15:27 schrieb Max Braun:
>
>> I put your code in a basic Android project using slf4j-api-1.5.6.jar 
>> and slf4j-jdk14-1.5.6.jar from openrdf-sesame-2.3-pr1-sdk.zip. The 
>> error is the same that I got before:
>>
>> I/dalvikvm(  715): DexOpt: access denied from 
>> Lorg/slf4j/LoggerFactory; to field 
>> Lorg/slf4j/impl/StaticLoggerBinder;.SINGLETON
>> W/dalvikvm(  715): VFY: unable to resolve static field 59 (SINGLETON) 
>> in Lorg/slf4j/impl/StaticLoggerBinder;
>> W/dalvikvm(  715): VFY:  rejecting opcode 0x62 at 0x0006
>> W/dalvikvm(  715): VFY:  rejected 
>> Lorg/slf4j/LoggerFactory;.getSingleton 
>> ()Lorg/slf4j/impl/StaticLoggerBinder;
>> W/dalvikvm(  715): Verifier rejected class Lorg/slf4j/LoggerFactory;
>> D/AndroidRuntime(  715): Shutting down VM

Without knowing much if anything about Android, I would guess that the 
verifier runs as part of the class loading, and that the verifier 
dislikes the bytecode in slf4j.

If your slf4j files are downloaded from slf4j.org they should be built 
by Ceki's release procedure which I believe compiles with stock javac to 
Java 5 compliant files.

Hence the question is whether Android have any additional restrictions 
requireing optional byte code processing tools you may have to use to 
make the jars compliant?


-- 
  Thorbjørn Ravn Andersen  "...plus... Tubular Bells!"




More information about the slf4j-user mailing list