Add ERROR log with JVMTI version explanation

We semi-regularly get bugs where people report being unable to get
JVMTI on non-debuggable processes running on userdebug/eng devices.
This new log line will help anyone who hits this have a better idea of
next steps hopefully.

The confusion is mostly around assuming that if JVMTI isn't available
the attachAgent function will throw and the Agent_OnAttach function
will not be called. While this is true for 'user' builds on
'userdebug' and 'eng' we will allow the agent to start but if the
processes is not debuggable only kArtTiVersion (0x70010200) jvmtiEnvs
can be created. These envs have somewhat looser specifications then
the normal jvmtiEnvs and are used to provide best-effort debugger
support on userdebug, among other things.

Test: manual
Bug: 178033907
Change-Id: I03993ae5200e5d308180014f6fedb3d2062c0d77
diff --git a/openjdkjvmti/OpenjdkJvmTi.cc b/openjdkjvmti/OpenjdkJvmTi.cc
index a5c5df6..09900e1 100644
--- a/openjdkjvmti/OpenjdkJvmTi.cc
+++ b/openjdkjvmti/OpenjdkJvmTi.cc
@@ -1438,6 +1438,13 @@
     return JNI_OK;
   } else {
     printf("version 0x%x is not valid!", version);
+    if (IsJvmtiVersion(version)) {
+      LOG(ERROR) << "JVMTI Version 0x" << std::hex << version << " requested but the runtime is not"
+                 << " debuggable! Only limited, best effort kArtTiVersion"
+                 << " (0x" << std::hex << kArtTiVersion << ") environments are available. If"
+                 << " possible, rebuild your apk in debuggable mode or start the runtime with"
+                 << " the `-Xcompiler-option --debuggable` flags.";
+    }
     return JNI_EVERSION;
   }
 }