title: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/appcompat/app/AppCompatActivity;
body: <p>I have unity app with android studio plugin, that load android camera app on my phone when I press the button... Here java class:</p>
  <pre><code> import android.content.Intent;
   import android.os.Bundle;
   import android.provider.MediaStore;
   import androidx.appcompat.app.AppCompatActivity;
  
  
   public class LoadAndroidApp extends AppCompatActivity 
   {
       @Override
       protected void onCreate(Bundle savedInstanceState) 
     {
  
       super.onCreate(savedInstanceState);
       Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
       startActivity(intent);
     }
   }
  </code></pre>
  <p>here my build gradle:</p>
  <pre><code>    apply plugin: 'com.android.library'
  
  android {
  compileSdkVersion 30
  buildToolsVersion &quot;30.0.3&quot;
  
  defaultConfig {
      minSdkVersion 24
      targetSdkVersion 30
      versionCode 1
      versionName &quot;1.0&quot;
  
      testInstrumentationRunner &quot;androidx.test.runner.AndroidJUnitRunner&quot;
      consumerProguardFiles &quot;consumer-rules.pro&quot;
  }
  
  buildTypes {
      release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
      }
    }
  }
  
  dependencies 
  {
    implementation fileTree(dir: &quot;libs&quot;, include: [&quot;*.jar&quot;])
    implementation  'androidx.appcompat:appcompat:1.1.0-alpha04'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
  
  }
  </code></pre>
  <p>When I launch my unity app, it doesn't crush, but I have this error in logcat:</p>
  <pre><code> 2021-04-27 18:45:26.327 27678-27700/? E/Unity: AndroidJavaException: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/appcompat/app/AppCompatActivity;
  java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/appcompat/app/AppCompatActivity;
      at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
      at com.unity3d.player.UnityPlayer.access$300(Unknown Source:0)
      at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:95)
      at android.os.Handler.dispatchMessage(Handler.java:103)
      at android.os.Looper.loop(Looper.java:241)
      at com.unity3d.player.UnityPlayer$e.run(Unknown Source:20)
   Caused by: java.lang.ClassNotFoundException: androidx.appcompat.app.AppCompatActivity
      at com.unity3d.player.UnityPlayer.nativeRender(Native Method) 
      at com.unity3d.player.UnityPlayer.access$300(Unknown Source:0) 
      at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:95) 
      at android.os.Handler.dispatchMessage(Handler.java:103) 
      at android.os.Looper.loop(Looper.java:241) 
      at com.unity3d.player.UnityPlayer$e.run(Unknown Source:20) 
    at UnityEngine.AndroidJNISafe.CheckException () [0x00000] in &lt;00000000000000000000000000000000&gt;:0 
    at UnityEngine.AndroidJNISafe.FindClass (System.String name) [0x00000] in &lt;00000000000000000000000000000000&gt;:0 
    at UnityEngine.AndroidJavaClass._AndroidJavaClass (System.String className) [0x00000] in &lt;00000000000000000000000000000000&gt;:0 
  </code></pre>
  <p>please, help, I need some feedback... I read that This is happening because the aar file doesn't contain external dependencies that we add in gradle file, but I didn't have error when I created my plugin... Please, help... Thank you in advance.</p>