title: What are the specific conditions that cause Unity3D's AndroidJavaClass to throw on new?
body: <p>This code throws on new AndroidJavaClass:</p>
  
  <pre><code>    public static bool Initialize(ref string msg)
      {
          if (instance_ == null)
          {
              GameObject newGameObject = new GameObject("EstimoteDeviceController");
              newGameObject.AddComponent&lt;EstimoteDevicePlugin&gt;();
              instance_ = newGameObject.GetComponent&lt;EstimoteDevicePlugin&gt;();
  
          #if UNITY_ANDROID
              try
              {
                  using (AndroidJavaClass androidClass = new AndroidJavaClass("EstimoteBeaconActivity"))
                  {
                      instance_.androidActivity_ = androidClass.GetStatic&lt;AndroidJavaObject&gt;("mContext");
                  }
              }
              catch (Exception e)
              {
                  msg = e.StackTrace;
                  Debug.LogWarning("[EstimoteDevicePlugin] - Initialize(): exception thrown: " + msg);
                  return false;
              }
          #endif
  
          }
  
          return true;
      }
  </code></pre>
  
  <p>Generates this stack trace when it throws : </p>
  
  <pre><code>at UnityEngine.AndroidJNISafe.CheckException () [0x00000] in &lt;filename unknown&gt;:0
  at UnityEngine.AndroidJNISafe.CallStaticObjectMethod (IntPtr clazz.IntPtr methodID, UnityEngine.jvalue[] args) [0x00000] in &lt;filename unknown&gt;:0
  at UnityEngine.AndroidJavaObject._CallStatic[AndroidJavaObject] (System.String.methodName.System.Object[] args) [0x00000] in &lt;filename unknown&gt;:0
  at UnityEngine.AndroidJavaObject.CallStatic[AndroidJavaObject] (System.String.methodName.System.Object[] args) [0x00000] in &lt;filename unknown&gt;:0
  at UnityEngine.AndroidJavaObject.FindClass (System.String name) [0x00000] in &lt;filename unknown&gt;:0  
  at UnityEngine.AndroidJavaObject._AndroidJavaClass (System.String className) [0x00000] in &lt;filename unknown&gt;:0 
  at UnityEngine.AndroidJavaObject.AndroidJavaClass (System.String className) [0x00000] in &lt;filename unknown&gt;:0 
  at EstimoteDevice.EstimoteDevicePlugin.Initialize (System.String&amp; msg) [0x00000] in &lt;filename unknown&gt;:0 
  </code></pre>
  
  <p>I've searched for this and so far have not found a conclusive answer to <em>why</em> is happens, only that it does, and the plug-in vendor (e.g. Facebook) have addressed it in a later version of their plug-in. </p>
  
  <p>I've repeated this with Android SDK tools 23, Android platform + builds tools 19 + 20, SDK v4.4.2 + v4.4W, on both Windows8.1 and MacOSX 10.9.4. It's Unity v4.6b17.</p>
  
  <p>I'm guessing it's a build issue with my .jar file as Unity apparently can't find the class I'm referencing by string in the call. I have experience writing Unity plug-ins for iOS.</p>
  
  <p>Thanks in advance.</p>