Android Studio - Estimote SDK - 找不到类

 惬听风吟jyy_802 发布于 2023-01-16 14:18

我正在使用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.
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.
...

我试过去项目结构并通过它添加库,在我的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();
        }
    }

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

撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有