title: Error on using weka library on android (Want to Implement Machine Learning in an Android Application)
body: <p>For implementing Machine Learning in an Android Application, I am using 'WEKA Tool' which I have included it on the Project 'libs' and compile it from the 'gradle' of project.</p>
  
  <p>But while running on the phone when that functions invoked which doing the classification (calling 'RandomForest Classifier'), my app goes crashed.</p>
  
  <p>I am getting this 'Runtime Error'. Can anyone help me please?</p>
  
  <pre><code>   Unable to create WEKA_HOME (/wekafiles)
     Unable to create packages directory (/wekafiles/packages)
     Unable to create repository cache directory (/wekafiles/repCache)
     D/AndroidRuntime: Shutting down VM
     E/AndroidRuntime: FATAL EXCEPTION: main
            Process: com.example.weirdmyth.testapp, PID: 31474
            java.lang.NoClassDefFoundError: Failed resolution of: Ljava/awt/GraphicsEnvironment;
                 at weka.core.packageManagement.PackageManager.setProxyAuthentication(PackageManager.java:191)
                 at weka.core.WekaPackageManager.establishWekaHome(WekaPackageManager.java:377)
                 at weka.core.WekaPackageManager.&lt;clinit&gt;(WekaPackageManager.java:162)
                 at weka.core.Utils.readProperties(Utils.java:174)
                 at weka.core.Capabilities.&lt;init&gt;(Capabilities.java:275)
                 at weka.classifiers.AbstractClassifier.getCapabilities(AbstractClassifier.java:508)
                 at weka.classifiers.trees.RandomTree.getCapabilities(RandomTree.java:602)
                 at weka.classifiers.trees.RandomForest.getCapabilities(RandomForest.java:182)
                 at weka.classifiers.meta.Bagging.buildClassifier(Bagging.java:701)
                 at com.example.weirdmyth.testapp.MainActivity.showExtractData(MainActivity.java:68)
                 at com.example.weirdmyth.testapp.MainActivity.access$000(MainActivity.java:18)
                 at com.example.weirdmyth.testapp.MainActivity$1.onClick(MainActivity.java:35)
                 at android.view.View.performClick(View.java:4794)
                 at android.view.View$PerformClick.run(View.java:19905)
                 at android.os.Handler.handleCallback(Handler.java:739)
                 at android.os.Handler.dispatchMessage(Handler.java:95)
                 at android.os.Looper.loop(Looper.java:139)
                 at android.app.ActivityThread.main(ActivityThread.java:5298)
                 at java.lang.reflect.Method.invoke(Native Method)
                 at java.lang.reflect.Method.invoke(Method.java:372)
                 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:950)
                 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:745)
           Caused by: java.lang.ClassNotFoundException: Didn't find class "java.awt.GraphicsEnvironment" on path: DexPathList[[dex file "/data/data/com.example.weirdmyth.testapp/files/instant-run/dex/slice-weka_24a0e957b7a2bd7b1eca884c1d1fe17134d04e02-classes.dex", dex file "/data/data/com.example.weirdmyth.testapp/files/instant-run/dex/slice-support-annotations-24.2.0_1d91a870686be0d9b2c0cad6f095599608f8ea8b-classes.dex", dex file "/data/data/com.example.weirdmyth.testapp/files/instant-run/dex/slice-slice_9-classes.dex", dex file "/data/data/com.example.weirdmyth.testapp/files/instant-run/dex/slice-slice_8-classes.dex", dex file "/data/data/com.example.weirdmyth.testapp/files/instant-run/dex/slice-slice_7-classes.dex", dex file "/data/data/com.example.weirdmyth.testapp/files/instant-run/dex/slice-slice_6-classes.dex", dex file "/data/data/com.example.weirdmyth.testapp/files/instant-run/dex/slice-slice_5-classes.dex", dex file "/data/data/com.example.weirdmyth.testapp/files/instant-run/dex/slice-slice_4-classes.dex", dex file "/data/data/com.example.weirdmyth.testapp/files/instant-run/dex/slice-slice_3-classes.dex", dex file "/data/data/com.example.weirdmyth.testapp/files/instant-run/dex/slice-slice_2-classes.dex", dex file "/data/data/com.example.weirdmyth.testapp/files/instant-run/dex/slice-slice_1-classes.dex", dex file "/data/data/com.example.weirdmyth.testapp/files/instant-run/dex/slice-slice_0-classes.dex", dex file "/data/data/com.example.weirdmyth.testapp/files/instant-run/dex/slice-internal_impl-24.2.0_e60a43d4d67966d22f555860d8f3ea89bf40a00d-classes.dex", dex file "/data/data/com.example.weirdmyth.testapp/files/instant-run/dex/slice-internal_impl-24.2.0_bab1238d93c9b1e214aa74253243e0e0a1179d1b-classes.dex", dex file "/data/data/com.example.weirdmyth.testapp/files/instant-run/dex/slice-internal_impl-24.2.0_ac3ce21dd47241b373379a2a2250d916ddec89f2-classes.dex", dex file "/data/data/com.example.weirdmyth.testapp/files/instant-run/dex/slice-internal_impl-24.2.0_86622e6ad735878a3262fd8fb6bc9c316447f2bd-classes.dex", dex file "/data/data/com.example.weirdmyth.testapp/files/instant-run/dex/slice-internal_impl-24.2.0_024d25ee6599778d6213941fb989deeaa23d0a37-classes.dex", dex file "/data/data/com.example.weirdmyth.testapp/files/instant-run/dex/slice-com.android.support-support-vector-drawable-24.2.0_a300254740b0ce696848c36d6b2c7e26898aba9c-classes.dex", dex file "/data/data/com.example
  </code></pre>