Trying to build and run an app in Android Studio 2.2.2 that does work in Eclipse. When I try to debug it (on a Samsung Galaxy tab 4) I get: (BTW is there any way to get this to come out more readably in StackOverflow?)
I/System.out: waiting for debugger to settle... I/System.out: debugger has settled (1484) I/InstantRun: Instant Run Runtime started. Android package is com.xxxxxxx.remote, real application class is null. W/InstantRun: No instant run dex files added to classpath D/AndroidRuntime: Shutting down VM E/AndroidRuntime: FATAL EXCEPTION: main Process: com.xxxxxxx.remote, PID: 1925 java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.xxxxxxx.remote/com.xxxxxxx.remote.RemoteControlActivity}: java.lang.ClassNotFoundException: Didn't find class "com.xxxxxxx.remote.RemoteControlActivity" on path: DexPathList[[zip file "/data/app/com.xxxxxxx.remote-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2644) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2867) at android.app.ActivityThread.access$900(ActivityThread.java:181) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1476) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:6134) 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:1399) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194) Caused by: java.lang.ClassNotFoundException: Didn't find class "com.xxxxxxx.remote.RemoteControlActivity" on path: DexPathList[[zip file "/data/app/com.xxxxxxx.remote-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:511) at java.lang.ClassLoader.loadClass(ClassLoader.java:469) at android.app.Instrumentation.newActivity(Instrumentation.java:1079) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2634) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2867)
...etc... I've "xxxxx"'ed out a proprietary name. What do real application class is null and No instant run dex files added to classpath mean? Also I see the reference to "Unable to instantiate activity ComponentInfo" in a lot of similar questions - what does it mean?
The activity it can't find is declared in the manifest as...
<activity android:launchMode="singleTask"
android:label="@string/app_name"
android:windowNoTitle="false"
android:configChanges="orientation"
android:screenOrientation="landscape"
android:name=".RemoteControlActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
I can't even hit a breakpoint at the beginning of the Activity, so how do I debug this?