title: Can I use Bitmap with ormlite
body: <p>I am using class Category </p>
  
  <pre><code>package Entities;
  
  import java.util.ArrayList;
  
  import com.j256.ormlite.field.DatabaseField;
  
  import utils.ImageHelper;
  
  import android.graphics.Bitmap;
  import android.util.Base64;
  
  public class Category {
  
  
      @DatabaseField(generatedId = true)
      int id ;
      @DatabaseField
      String name ;
  
      String image;
  
      Bitmap bitmapImage;
  
  
  
  
      public Bitmap getBitmapImage() {
          return bitmapImage;
      }
  
      public void setBitmapImage(Bitmap bitmapImage) {
          this.bitmapImage = bitmapImage;
      }
  
      public String getImage() {
          return image;
      }
  
      public void setImage(String image) {
          this.image = image;
      }
  
      public String getName() {
          return name;
      }
  
      public void setName(String name) {
          this.name = name;
      }
  
  
      ArrayList&lt;Item&gt; items;
  
  
  
      public Category (int id,String CN , String CP)
      {
          this.id=id;
          name=CN;
          image=CP;
  
      }
  
      public Category (String CN , String CP)
      {
  
          name=CN;
          image=CP;
  
      }
  
      public Category ()
      {
  
  
      }
  
      public ArrayList&lt;Item&gt; getItems() {
          return items;
      }
      public void setItems(ArrayList&lt;Item&gt; items) {
          this.items = items;
      }
      public int getId() {
          return id;
      }
      public void setId(int id) {
          this.id = id;
      }
  
      public void  convertStringImageToBitmapImage()
      {
          if(image!=null)
          {
          byte[] imgData = Base64.decode(image, Base64.DEFAULT);
          bitmapImage = ImageHelper.CreateBitmapFromByteArray(imgData);
          image="";
          }
  
  
      }
  
  
  }
  </code></pre>
  
  <p>I recieve my photo from webservice as string base64 and I change it to bitmap using convertStringImageToBitmapImage and I want to use this class for ormlite , but I am receiving this problem </p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: Landroid/graphics/Bitmap;
      at java.lang.Class.getDeclaredFields0(Native Method)
      at java.lang.Class.privateGetDeclaredFields(Class.java:2387)
      at java.lang.Class.getDeclaredFields(Class.java:1796)
      at com.j256.ormlite.android.apptools.OrmLiteConfigUtil.writeConfigForTable(OrmLiteConfigUtil.java:220)
      at com.j256.ormlite.android.apptools.OrmLiteConfigUtil.writeConfigFile(OrmLiteConfigUtil.java:144)
      at com.j256.ormlite.android.apptools.OrmLiteConfigUtil.writeConfigFile(OrmLiteConfigUtil.java:133)
      at com.j256.ormlite.android.apptools.OrmLiteConfigUtil.writeConfigFile(OrmLiteConfigUtil.java:124)
      at database.DatabaseConfigUtil.main(DatabaseConfigUtil.java:21)
  Caused by: java.lang.ClassNotFoundException: android.graphics.Bitmap
      at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      ... 8 more
  </code></pre>
  
  <p>How can I solve that ?</p>