0

If I write this code:

ImageLoader imageLoader = ImageLoader.getInstance(); 

I get this error:

06-16 16:04:23.729: E/AndroidRuntime(13889): java.lang.NoClassDefFoundError: com.nostra13.universalimageloader.core.ImageLoader

I've added universal-image-loader-1.8.4.jar in lib and imported com.nostra13.universalimageloader.core.ImageLoader

How can I use the ImageLoader class?

Sam
  • 86,580
  • 20
  • 181
  • 179
Nikolay
  • 344
  • 1
  • 15
  • if your looking for code snippets http://stackoverflow.com/questions/16789676/caching-images-and-displaying/16978285#16978285 this can help – Raghunandan Jun 16 '13 at 13:21
  • add compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5' to your gradle file – Nikolay Sep 09 '18 at 02:24

1 Answers1

1

You need to add the jar to the libs folder and not to the lib. If you add it manually to the lib folder, then go to:
-> Java Build Path -> Order and Export and there select the jar

sromku
  • 4,663
  • 1
  • 36
  • 37
  • Yes, l do it before ask the qquestion – Nikolay Jun 16 '13 at 21:05
  • If you use Eclipse+ADT plugin then you need only put jat into `libs` folder. **Don't reference** jar from `Java Build Path -> ...` Delete reference from there if any. – nostra13 Jun 17 '13 at 06:14