Android Studio - Estimote SDK - 找不到类

时间:2014-05-06 18:00:11

标签: android ibeacon-android estimote

我正在使用Estimote Android SDK& Android Studio。我已将estimote-sdk-preview.jar添加到我的libs文件夹中,并且IDE识别它(我的任何.java文件中没有错误)但是当它上传到我的HTC One时我收到以下错误在logcat中,我在手机上收到“抱歉此应用已崩溃”的消息:

...
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>
...

我已尝试进入项目结构并通过它添加库,在我的gradle属性中:

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'
}

这是我的.java文件的开头:

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();
        }
    }

所以我很难过,任何人都可以帮助我吗?

0 个答案:

没有答案