こんにちは、Glympse API を使用して Android 用のアプリをプログラミングしようとしていますが、createGlymspe 関数を使用して Glympse インスタンスを作成しようとするたびに、このエラーが発生します
08-21 11:10:47.014: E/AndroidRuntime(22391): FATAL EXCEPTION: main
08-21 11:10:47.014: E/AndroidRuntime(22391): java.lang.ExceptionInInitializerError
08-21 11:10:47.014: E/AndroidRuntime(22391): at com.glympse.android.hal.l.<init>(ContextHolder.java:29)
08-21 11:10:47.014: E/AndroidRuntime(22391): at com.glympse.android.hal.bd.l(HalFactory.java:23)
08-21 11:10:47.014: E/AndroidRuntime(22391): at com.glympse.android.a.gz.a(LibFactory.java:35)
08-21 11:10:47.014: E/AndroidRuntime(22391): at com.glympse.android.api.ad.a(GlympseFactory.java:72)
08-21 11:10:47.014: E/AndroidRuntime(22391): at com.glympse.android.api.ad.a(GlympseFactory.java:54)
08-21 11:10:47.014: E/AndroidRuntime(22391): at com.glympse.android.lite.LiteFactory.createGlympse(LiteFactory.java:42)
08-21 11:10:47.014: E/AndroidRuntime(22391): at pcr.test02.MainActivity$1.onClick(MainActivity.java:27)
08-21 11:10:47.014: E/AndroidRuntime(22391): at android.view.View.performClick(View.java:3558)
08-21 11:10:47.014: E/AndroidRuntime(22391): at android.view.View$PerformClick.run(View.java:14157)
08-21 11:10:47.014: E/AndroidRuntime(22391): at android.os.Handler.handleCallback(Handler.java:605)
08-21 11:10:47.014: E/AndroidRuntime(22391): at android.os.Handler.dispatchMessage(Handler.java:92)
08-21 11:10:47.014: E/AndroidRuntime(22391): at android.os.Looper.loop(Looper.java:137)
08-21 11:10:47.014: E/AndroidRuntime(22391): at android.app.ActivityThread.main(ActivityThread.java:4514)
08-21 11:10:47.014: E/AndroidRuntime(22391): at java.lang.reflect.Method.invokeNative(Native Method)
08-21 11:10:47.014: E/AndroidRuntime(22391): at java.lang.reflect.Method.invoke(Method.java:511)
08-21 11:10:47.014: E/AndroidRuntime(22391): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:790)
08-21 11:10:47.014: E/AndroidRuntime(22391): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:557)
08-21 11:10:47.014: E/AndroidRuntime(22391): at dalvik.system.NativeStart.main(Native Method)
08-21 11:10:47.014: E/AndroidRuntime(22391): Caused by: java.lang.NoClassDefFoundError: com.glympse.android.api.R$drawable
08-21 11:10:47.014: E/AndroidRuntime(22391): at com.glympse.android.hal.db.<clinit>(ResourceGateway.java:13)
08-21 11:10:47.014: E/AndroidRuntime(22391): ... 18 more
コードは次のとおりです。
package pcr.test02;
import com.glympse.android.lite.GGlympseLite;
import com.glympse.android.lite.LiteFactory;
import android.os.Bundle;
import android.app.Activity;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.Toast;
public class MainActivity extends Activity {
GGlympseLite glympse;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
glympse = LiteFactory.createGlympse(getBaseContext(), "sandbox.glympse.com", "I will not share my key ;-)");
Button btn1 = (Button) findViewById(R.id.button1);
btn1.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
Toast.makeText(getApplicationContext(), "Glymp",
Toast.LENGTH_LONG).show();
}
});
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}
}
問題がコンテキストかどうかはわかりませんが、「これ」で変更しようとしましたが、役に立ちませんでした