1

我正在尝试将 Estimote SDK 集成到 Android 应用程序中。我正在遵循https://github.com/Estimote/Android-SDK上提供的 SDK 说明。我已将 estimote-sdk-preview.jar 文件添加到 libs 目录中。任何想法我做错了什么?

我收到的错误消息是:

  • 无法解析符号“估计”
  • 无法解析符号“sdk”
  • 无法解析符号“服务”
  • 无法解析符号“BeaconService”

这就是我尝试添加服务的方式

<service android:name="com.estimote.sdk.service.BeaconService"
    android:exported="false"/>

显现

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="company.com.application1" >
    <uses-permission android:name="android.permission.BLUETOOTH"/>
    <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        //----------THIS IS WHERE THE ERRORS ARE----------
        <service android:name="com.estimote.sdk.service.BeaconService"
        android:exported="false"/>
    </application>

</manifest>
4

1 回答 1

5

您应该转到文件 -> 项目结构 -> 单击绿色 + -> 从“更多模块”列表中选择“导入 .JAR 或 .AAR 包” -> 选择 JAR 文件。然后转到您的 build.gradle 文件并将以下行添加到您的依赖项块

compile project(':estimote-sdk-preview')
于 2015-01-19T09:29:31.870 回答