Android Didn't find class <p>I'm following a Gif tutorial and created a custom class in my <code>wear/java/com.example.marcus.prog</code> folder called 'GIFView', but I can't reference this class from my XML layout. I've tried all sorts of combinations but I keep getting two errors about not finding the class.</p> <pre><code> java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.marcus.prog/com.example.marcus.prog.AttackScreen}: android.view.InflateException: Binary XML file line #20: Error inflating class com.example.marcus.prog.GIFView Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.marcus.prog.GIFView" on path: DexPathList[[zip file "/system/framework/com.google.android.wearable.jar", zip file "/data/app/com.example.marcus.prog-4/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]] </code></pre> <p>My XML file looks like</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/container" android:layout_width="match_parent" android:layout_height="match_parent" tools:deviceIds="wear" android:orientation="vertical" &gt; &lt;prog.GIFView android:layout_width="wrap_content" android:layout_height="wrap_content" /&gt; </code></pre> <p>Thanks</p>