title: AWS Amplify - com.amplifyframework.AmplifyException: Unknown/bad category type: dataStore
body: <p>Good day All,</p>
  
  <p>I have this error during data store plugin adding on amplify initialization.</p>
  
  <p><code>com.amplifyframework.AmplifyException: Unknown/bad category type: dataStore</code></p>
  
  <p>I have added the code i believe is pertinent, please ask for more if need it, have follow documentation as good as possible.</p>
  
  <p>Thanks !!</p>
  
  <p>Android logs</p>
  
  <pre><code>2020-04-17 18:58:55.797 30894-30928/com.bakeano.htejobs E/bakeanoMessage: Amplify adding plugins Exception: Unknown/bad category type: dataStore
      com.amplifyframework.AmplifyException: Unknown/bad category type: dataStore
          at com.amplifyframework.core.AmplifyConfiguration.forCategoryType(AmplifyConfiguration.java:4)
          at com.amplifyframework.core.Amplify.configure(Amplify.java:16)
          at com.amplifyframework.core.Amplify.configure(Amplify.java:1)
          at com.bakeano.htejobs.MyApplication$1.onResult(MyApplication.java:36)
          at com.bakeano.htejobs.MyApplication$1.onResult(MyApplication.java:23)
          at com.amazonaws.mobile.client.internal.InternalCallback.call(InternalCallback.java:75)
          at com.amazonaws.mobile.client.internal.InternalCallback.onResult(InternalCallback.java:62)
          at com.amazonaws.mobile.client.AWSMobileClient$2.run(AWSMobileClient.java:596)
          at com.amazonaws.mobile.client.internal.InternalCallback$1.run(InternalCallback.java:101)
          at java.lang.Thread.run(Thread.java:762)
  </code></pre>
  
  <p>Android Application Class <strong>(MyApplication.java)</strong></p>
  
  <pre><code>package com.bakeano.htejobs;
  
  import android.app.Application;
  import android.util.Log;
  
  import com.amazonaws.mobile.client.AWSMobileClient;
  import com.amazonaws.mobile.client.Callback;
  import com.amazonaws.mobile.client.UserStateDetails;
  import com.amplifyframework.api.aws.AWSApiPlugin;
  import com.amplifyframework.core.Amplify;
  import com.amplifyframework.core.model.ModelProvider;
  import com.amplifyframework.datastore.AWSDataStorePlugin;
  import com.amplifyframework.datastore.generated.model.AmplifyModelProvider;
  
  public class MyApplication extends Application {
  
  
      @Override
      public void onCreate() {
          super.onCreate();
  
          // AWSMobileClient initialization
          AWSMobileClient.getInstance().initialize(getApplicationContext(), new Callback&lt;UserStateDetails&gt;() {
              @Override
              public void onResult(UserStateDetails result) {
                  try {
                      // AWS Amplify datastore plugin
                      ModelProvider modelProvider = AmplifyModelProvider.getInstance();
                      Amplify.addPlugin(AWSDataStorePlugin.forModels(modelProvider)); &lt;--- Error line
  
                      // AWS Amplify api plugin
                      Amplify.addPlugin(new AWSApiPlugin());
  
                      // AWS Amplify configure
                      Amplify.configure(getApplicationContext()); &lt;--- Exception line
                  } catch (Exception e) {
                      Log.e("bakeanoMessage", "Amplify adding plugins Exception: " + e.getMessage(), e);
                  }
              }
  
              @Override
              public void onError(Exception e) {
                  Log.e("bakeanoMessage", "AWSMobileClient init Exception: " + e.getMessage(), e);
              }
          });
      }
  }
  </code></pre>
  
  <p>Amplify status from amplify-cli <code>amplify status</code></p>
  
  <pre><code>Current Environment: dev
  
  Category  |  Resource name    |  Operation  |   Provider plugin
  -----------------------------------------------------------------
  Api       | amplifyDatasource | No Change   |   awscloudformation
  Auth      | someResourceName  | No Change   |   awscloudformation
  
  GraphQL endpoint: https://somekey.appsync-api.us-east-1.amazonaws.com/graphql
  GraphQL API KEY: someotherkey
  </code></pre>