6

I'm building an app using the Estimote Android SDK & Android Studio. I have added the estimote-sdk-preview.jar to my libs folder, and the IDE recognises it (no errors in any of my .java files) but when it gets uploaded to my HTC One I get the following errors in logcat and I get the "Sorry this app has crashed" message on my phone:

...
05-06 18:55:44.662  23179-23179/com.freshnode.daze E/dalvikvm﹕ Could not find class 'com.estimote.sdk.Region', referenced from method com.freshnode.daze.MainActivity.<clinit>
05-06 18:55:44.662  23179-23179/com.freshnode.daze E/dalvikvm﹕ Could not find class 'com.estimote.sdk.BeaconManager', referenced from method com.freshnode.daze.MainActivity.<init>
...

I have tried going to Project Structure and addding the library through that, in my gradle properties I have:

dependencies {
    compile files('libs/estimote-sdk-preview.jar')
    compile 'com.android.support:gridlayout-v7:19.0.0'
    compile 'com.android.support:appcompat-v7:19.0.0'
}

Here's the beginning of my .java file:

public class MainActivity extends ActionBarActivity {

    private static final String ESTIMOTE_PROXIMITY_UUID = "B9407F30-F5F8-466E-AFF9-25556B57FE6D";
    private static final Region ALL_ESTIMOTE_BEACONS = new Region("regionId", ESTIMOTE_PROXIMITY_UUID, null, null);

    private BeaconManager beaconManager = new BeaconManager(this);

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        if (savedInstanceState == null) {
            getSupportFragmentManager().beginTransaction()
                    .add(R.id.container, new PlaceholderFragment())
                    .commit();
        }
    }

So I'm pretty stumped, can anyone help me?

Tom Hallam
  • 1,924
  • 16
  • 24

0 Answers0