Hi,
I am new to both android and program AB. but my main problem is program AB , I have downloaded program-ab-0.0.6.26 and added the jar files in the lib folder to the library of my android project.
lib folder containing: Ab.jar, commons-codec-1.6.jar, commons-logging-1.1.1.jar, hamcrest-all-1.3.jar, httpclient-4.2.1.jar, httpclient-cache-4.2.1.jar, httpcore-4.2.1.jar, httpmime-4.2.1.jar, jgoodies-common.jar, jgoodies-forms.jar, joda-time-2.1.jar, json-20090211.jar, junit-4.11.jar, sanmoku-0.0.5.jar, sanmoku-feature-ex-0.0.1.jar
and I wrote a simple program in android to see if it works…
here is my main activity in android:
package com.example.test_program_ab;
//import android.R.string;
import android.os.Bundle;
//import android.provider.Settings.System;
import android.app.Activity;
//import android.util.Log;
import android.view.Menu;
import android.widget.TextView;
import org.alicebot.ab.*;
import org.alicebot.ab.Bot;
public class MainActivity extends Activity
{
String botname = "alice2";
String path = "D:/university courses/A.terms/Final project/program-ab-0.0.6.26/bots";
Bot bot = new Bot(botname, path);
Chat chatSession = new Chat(bot);
String request = "Hello. Are you alive? What is your name?";
String response = chatSession.multisentenceRespond(request);
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
TextView t = new TextView(this);
t = (TextView) findViewById(R.id.text);
t.setText(response);
}
@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;
}
}
and I get errors :
[2014-08-28 14:38:53 - Dex Loader] Unable to execute dex: Multiple dex files define Lcom/jgoodies/common/base/Objects;
[2014-08-28 14:38:53 - test_program_ab] Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lcom/jgoodies/common/base/Objects;
can anybody help me? what is this error?