2016-04-13 52 views
0

我已经下载了演示“java_quick_start_example”。 1.我直接运行应用程序,但失败。该日志被描述为 TangoErrorType TangoService_initialize (JNIEnv*, jobject): Done initializing, error code = -1 2.我修改代码如下有关新探戈的信息()

mTango = new Tango(this, new Runnable() { 
      @Override 
      public void run() { 
      } 
}); 

它失败了。该日志被描述为"Error - TangoService_connectOnPoseAvailable: -1"

回答

0

从探戈实施例的一些示例拉:

mTango = new Tango(MotionTrackingActivity.this, new Runnable() { 
     // Pass in a Runnable to be called from UI thread when Tango is ready, 
     // this Runnable will be running on a new thread. 
     // When Tango is ready, we can call Tango functions safely here only 
     // when there is no UI thread changes involved. 
     @Override 
     public void run() { 
      mConfig = setupTangoConfig(mTango); 

      try { 
       setTangoListeners(); 
      } catch (TangoErrorException e) { 
       Log.e(TAG, getString(R.string.exception_tango_error), e); 
      } catch (SecurityException e) { 
       Log.e(TAG, getString(R.string.permission_motion_tracking), e); 
      } 
      try { 
       mTango.connect(mConfig); 
      } catch (TangoOutOfDateException e) { 
       Log.e(TAG, getString(R.string.exception_out_of_date), e); 
      } catch (TangoErrorException e) { 
       Log.e(TAG, getString(R.string.exception_tango_error), e); 
      } 
     } 
    }); 
}