How to fix Android NFC Demo Reference issue

I am trying to play around with Android’s NFC(Near Field Communitcation) demo program. But I was having issue just compiling the demo.

Issue is in the references.

import com.google.common.base.Charsets;
import com.google.common.base.Preconditions;
import com.google.common.primitives.Bytes;

The SDK comes with the guavalib.jar. We have to add reference to that file.

 

I am using IntellijIDEA and I will show you how you can do that from that IDE.

On the IDE go to File –> Project Structure

 

Select Dependency Tab

 

Select “Add” –> Select Single Entry Module

navigate to guavalib.jar ( [Your SDK LOCATION]\android-sdk-windows\tools\lib\guavalib.jar).

Run the project.

 

 

 

Your emulator should show the following.

 

 

Hopefully this helps you. Thanks.

Leave a Reply

Your email address will not be published. Required fields are marked *