Robofun 機器人論壇

標題: arduiono和android藍芽問題 [打印本頁]

作者: a76298    時間: 2013-8-13 21:40
標題: arduiono和android藍芽問題
你好,我要用藍芽將android和arduino連接,我在android端的程式如下:package com.example.arduinobt;

import android.app.Activity;
import android.os.Bundle;
import at.abraxas.amarino.Amarino;

public class Arduinobt extends Activity {
    final String DEVICE_ADDRESS="00:06:66:46:CC:D2";//我的藍芽裝置位址

@Override

protected void onCreate(Bundle savedInstanceState) {

// TODO Auto-generated method stub

super.onCreate(savedInstanceState);

setContentView(R.layout.main);

Amarino.connect(this, DEVICE_ADDRESS);

}

@Override

protected void onStop() {

// TODO Auto-generated method stub

super.onStop();

Amarino.disconnect(this, DEVICE_ADDRESS);

}


}

而我裝到手機時此應用程式打不開,若裝在模擬器上執行時,他說Amarino.connect(this, DEVICE_ADDRESS);有 java.lang.NoClassDefFoundError: at.abraxas.amarino.Amarino的問題,請問有甚麼方式可以解決??
我已參考過此兩個範例http://www.buildcircuit.com/multi-color-lamp-using-amarino-android-and-arduino/
http://www.buildcircuit.com/sensorgraph-using-android-amarino-and-arduino/




歡迎光臨 Robofun 機器人論壇 (https://robofun.net/forum/) Powered by Discuz! X3.2