I use the latest android studio, the USB disk is debugged, the phone is recognized by AS and a code that is readily compiled and runs on the simulator, however, when I just try to run the application, it does not cope with this error:
$ adb shell am start -n "com.example.ph.myapplication/com.example.ph.myapplication.OnlyTetstBBBAct" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Error while executing: am start -n "com.example.ph.myapplication/com.example.ph.myapplication.OnlyTetstBBBAct" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.ph.myapplication/.OnlyTetstBBBAct }
Error type 3
Error: Activity class {com.example.ph.myapplication/com.example.ph.myapplication.OnlyTetstBBBAct} does not exist.
Error while Launching activity
At the same time, I could see something like this in the Android monitor window (however, I'm not sure if it is 100% correlated):
01-12 17:50:19.111 18352-18352/? E/appproc: ERROR: could not find class 'com.android.commands.pm.Pm'
01-12 17:50:19.111 18352-18352/? A/art: art/runtime/thread.cc:1143] No pending exception expected: java.lang.ClassNotFoundException: Didn't find class "com.android.commands.pm.Pm" on path: DexPathList[[zip file "/system/framework/pm.jar"],nativeLibraryDirectories=[/vendor/lib64, /system/lib64]]
01-12 17:50:19.111 18352-18352/? A/art: art/runtime/thread.cc:1143] at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:56)
01-12 17:50:19.111 18352-18352/? A/art: art/runtime/thread.cc:1143] at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:511)
01-12 17:50:19.111 18352-18352/? A/art: art/runtime/thread.cc:1143] at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:469)
01-12 17:50:19.111 18352-18352/? A/art: art/runtime/thread.cc:1143]
01-12 17:50:19.231 18352-18352/? A/art: art/runtime/runtime.cc:289] Runtime aborting...
01-12 17:50:19.231 18352-18352/? A/art: art/runtime/runtime.cc:289] Aborting thread:
01-12 17:50:19.231 18352-18352/? A/art: art/runtime/runtime.cc:289] "main" prio=5 tid=1 Runnable
01-12 17:50:19.231 18352-18352/? A/art: art/runtime/runtime.cc:289] | group="" sCount=0 dsCount=0 obj=0x12c41100 self=0x55bed629b0
01-12 17:50:19.231 18352-18352/? A/art: art/runtime/runtime.cc:289] | sysTid=18352 nice=0 cgrp=default sched=0/0 handle=0x7fb6243e80
01-12 17:50:19.231 18352-18352/? A/art: art/runtime/runtime.cc:289] | state=R schedstat=( 347813798 1653280 115 ) utm=22 stm=12 core=1 HZ=100
01-12 17:50:19.231 18352-18352/? A/art: art/runtime/runtime.cc:289] | stack=0x7fddc23000-0x7fddc25000 stackSize=8MB
01-12 17:50:19.231 18352-18352/? A/art: art/runtime/runtime.cc:289] | held mutexes= "abort lock" "mutator lock"(shared held)
01-12 17:50:19.231 18352-18352/? A/art: art/runtime/runtime.cc:289] native:
01-12 17:50:19.231 18352-18352/? A/art: art/runtime/runtime.cc:289] native:
01-12 17:50:19.231 18352-18352/? A/art: art/runtime/runtime.cc:289] (no managed stack frames)
01-12 17:50:19.231 18352-18352/? A/art: art/runtime/runtime.cc:289] Pending exception java.lang.ClassNotFoundException thrown by 'unknown throw location'
01-12 17:50:19.231 18352-18352/? A/art: art/runtime/runtime.cc:289] java.lang.ClassNotFoundException: Didn't find class "com.android.commands.pm.Pm" on path: DexPathList[[zip file "/system/framework/pm.jar"],nativeLibraryDirectories=[/vendor/lib64, /system/lib64]]
01-12 17:50:19.231 18352-18352/? A/art: art/runtime/runtime.cc:289] at java.lang.Class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:56)
01-12 17:50:19.231 18352-18352/? A/art: art/runtime/runtime.cc:289] at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:511)
01-12 17:50:19.231 18352-18352/? A/art: art/runtime/runtime.cc:289] at java.lang.Class java.lang.ClassLoader.loadClass(java.lang.String) (ClassLoader.java:469)
01-12 17:50:19.231 18352-18352/? A/art: art/runtime/runtime.cc:289] Dumping all threads without appropriate locks held: thread list lock
...
, , , -, - , , , , , . , / , .
Upd1: , , AS, , - , , , apk/install new.