title: ClassNotFoundException (AppCompatActivity.class) after moving Android studio project from Windows to Mac
body: <p>:)</p>
  
  <p>I'm currently working on an Android app using Android Studio and after I have worked on it quite a while on my Windows machine, I am currently trying to get it running on my MacBook Air.</p>
  
  <p>I copied the project files and created an Emulator on the Mac (API 25). The project compiles just fine, but it immediately crashes on the Emulator due to the following error:</p>
  
  <pre><code>FATAL EXCEPTION: main
                                                                         Process: com.lennartschoch.partytime, PID: 5736
                                                                         java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.lennartschoch.partytime/com.lennartschoch.partytime.LoadingActivity}: java.lang.ClassNotFoundException: Didn't find class "com.lennartschoch.partytime.LoadingActivity" on path: DexPathList[[zip file "/data/app/com.lennartschoch.partytime-2/base.apk", zip file "/data/app/com.lennartschoch.partytime-2/split_lib_slice_3_apk.apk"],nativeLibraryDirectories=[/data/app/com.lennartschoch.partytime-2/lib/x86, /system/lib, /vendor/lib]]
                                                                             at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2567)
                                                                             at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726)
                                                                             at android.app.ActivityThread.-wrap12(ActivityThread.java)
                                                                             at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477)
                                                                             at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                             at android.os.Looper.loop(Looper.java:154)
                                                                             at android.app.ActivityThread.main(ActivityThread.java:6119)
                                                                             at java.lang.reflect.Method.invoke(Native Method)
                                                                             at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
                                                                             at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
                                                                          Caused by: java.lang.ClassNotFoundException: Didn't find class "com.lennartschoch.partytime.LoadingActivity" on path: DexPathList[[zip file "/data/app/com.lennartschoch.partytime-2/base.apk", zip file "/data/app/com.lennartschoch.partytime-2/split_lib_slice_3_apk.apk"],nativeLibraryDirectories=[/data/app/com.lennartschoch.partytime-2/lib/x86, /system/lib, /vendor/lib]]
                                                                             at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
                                                                             at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
                                                                             at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
                                                                             at android.app.Instrumentation.newActivity(Instrumentation.java:1078)
                                                                             at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2557)
                                                                             at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726) 
                                                                             at android.app.ActivityThread.-wrap12(ActivityThread.java) 
                                                                             at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1477) 
                                                                             at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                             at android.os.Looper.loop(Looper.java:154) 
                                                                             at android.app.ActivityThread.main(ActivityThread.java:6119) 
                                                                             at java.lang.reflect.Method.invoke(Native Method) 
                                                                             at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) 
                                                                             at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776) 
                                                                          Suppressed: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/app/AppCompatActivity;
                                                                             at java.lang.VMClassLoader.findLoadedClass(Native Method)
                                                                             at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:742)
                                                                             at java.lang.ClassLoader.loadClass(ClassLoader.java:362)
                                                                                  ... 12 more
                                                                          Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v7.app.AppCompatActivity" on path: DexPathList[[zip file "/data/app/com.lennartschoch.partytime-2/base.apk", zip file "/data/app/com.lennartschoch.partytime-2/split_lib_slice_3_apk.apk"],nativeLibraryDirectories=[/data/app/com.lennartschoch.partytime-2/lib/x86, /system/lib, /vendor/lib]]
                                                                             at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
                                                                             at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
                                                                             at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
                                                                                  ... 15 more
  </code></pre>
  
  <p>I have (hopefully) currectly implemented the Android Support Library (v7) which you can see in my build.gradle:</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 25
      buildToolsVersion "25.0.3"
      defaultConfig {
          applicationId "com.lennartschoch.partytime"
          minSdkVersion 19
          targetSdkVersion 25
          versionCode 1
          versionName "1.0"
          testInstrumentationRunner         "android.support.test.runner.AndroidJUnitRunner"
      }
  buildTypes {
      release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  
  dependencies {
      compile fileTree(include: ['*.jar'], dir: 'libs')
      androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
          exclude group: 'com.android.support', module: 'support-annotations'
      })
      compile 'com.android.support:design:25.3.1'
      compile 'com.android.support.constraint:constraint-layout:1.0.2'
      compile 'com.android.support:support-v4:25.3.1'
      compile 'com.android.support:recyclerview-v7:25.3.1'
      compile 'com.android.support:cardview-v7:25.3.1'
      testCompile 'junit:junit:4.12'
      compile 'com.android.support:appcompat-v7:25.3.1'
  }
  </code></pre>
  
  <p>I've already tried cleaning and rebuilding the project but I just cannot get rid of the problem. Any suggestions?</p>
  
  <p>Thanks!</p>