0

I would appreciate some help with figuring out what exactly this exception message is saying to me. I was able to using the debugger narrow down the problem to a particular line in code. However, I think more information to better figure out what the actual problem is in the code.

   public static List<ParsedNdefRecord> getRecords(NdefRecord[] records) 
    {
        List<ParsedNdefRecord> elements = new ArrayList<ParsedNdefRecord>();
        for (NdefRecord record : records) {
            if (UriRecord.isUri(record)) {
                elements.add(UriRecord.parse(record));
            } else if (TextRecord.isText(record)) {
                elements.add(TextRecord.parse(record));
            } else if (SmartPoster.isPoster(record)) {
                elements.add(SmartPoster.parse(record));
            }
        }
        return elements;
    }



09-10 13:47:38.207: D/dalvikvm(332): VFY: replacing opcode 0x71 at 0x000c
09-10 13:47:38.207: D/dalvikvm(332): VFY: dead code 0x000f-004f in Lcom/example/android/nfc/record/UriRecord;.parseWellKnown (Landroid/nfc/NdefRecord;)Lcom/example/android/nfc/record/UriRecord;
09-10 13:47:49.617: W/dalvikvm(332): Exception Ljava/lang/NoClassDefFoundError; thrown while initializing Lcom/example/android/nfc/record/UriRecord;
09-10 13:48:28.971: D/AndroidRuntime(332): Shutting down VM
09-10 13:48:28.971: W/dalvikvm(332): threadid=1: thread exiting with uncaught exception (group=0x40015560)
09-10 13:48:29.178: E/AndroidRuntime(332): FATAL EXCEPTION: main
09-10 13:48:29.178: E/AndroidRuntime(332): java.lang.ExceptionInInitializerError
09-10 13:48:29.178: E/AndroidRuntime(332):  at com.example.android.nfc.NdefMessageParser.getRecords(NdefMessageParser.java:48)
09-10 13:48:29.178: E/AndroidRuntime(332):  at com.example.android.nfc.NdefMessageParser.parse(NdefMessageParser.java:41)
09-10 13:48:29.178: E/AndroidRuntime(332):  at com.example.android.nfc.TagViewer.buildTagViews(TagViewer.java:105)
09-10 13:48:29.178: E/AndroidRuntime(332):  at com.example.android.nfc.TagViewer.resolveIntent(TagViewer.java:86)
09-10 13:48:29.178: E/AndroidRuntime(332):  at com.example.android.nfc.TagViewer.onCreate(TagViewer.java:59)
09-10 13:48:29.178: E/AndroidRuntime(332):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
09-10 13:48:29.178: E/AndroidRuntime(332):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
09-10 13:48:29.178: E/AndroidRuntime(332):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
09-10 13:48:29.178: E/AndroidRuntime(332):  at android.app.ActivityThread.access$1500(ActivityThread.java:117)
09-10 13:48:29.178: E/AndroidRuntime(332):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
09-10 13:48:29.178: E/AndroidRuntime(332):  at android.os.Handler.dispatchMessage(Handler.java:99)
09-10 13:48:29.178: E/AndroidRuntime(332):  at android.os.Looper.loop(Looper.java:123)
09-10 13:48:29.178: E/AndroidRuntime(332):  at android.app.ActivityThread.main(ActivityThread.java:3683)
09-10 13:48:29.178: E/AndroidRuntime(332):  at java.lang.reflect.Method.invokeNative(Native Method)
09-10 13:48:29.178: E/AndroidRuntime(332):  at java.lang.reflect.Method.invoke(Method.java:507)
09-10 13:48:29.178: E/AndroidRuntime(332):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
09-10 13:48:29.178: E/AndroidRuntime(332):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
09-10 13:48:29.178: E/AndroidRuntime(332):  at dalvik.system.NativeStart.main(Native Method)
09-10 13:48:29.178: E/AndroidRuntime(332): Caused by: java.lang.NoClassDefFoundError: com.google.common.collect.ImmutableBiMap
09-10 13:48:29.178: E/AndroidRuntime(332):  at com.example.android.nfc.record.UriRecord.<clinit>(UriRecord.java:51)
09-10 13:48:29.178: E/AndroidRuntime(332):  ... 18 more
09-10 13:48:39.069: I/Process(332): Sending signal. PID: 332 SIG: 9

1 Answer 1

2
 Caused by: java.lang.NoClassDefFoundError: com.google.common.collect.ImmutableBiMap

It seems you dont have valid guava libraries in runtime classpath. Make sure you have added them to lib folder.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.