安装适用于Android的Estimote SDK

Bra*_*don 1 android android-manifest android-studio estimote

我正在尝试将Estimote SDK集成到Android应用中.我按照https://github.com/Estimote/Android-SDK上提供的SDK说明进行操作.我已将estimote-sdk-preview.jar文件添加到libs目录中.我有什么想法我做错了吗?

我收到的错误消息是:

  • 无法解析符号'estimote'
  • 无法解析符号'sdk'
  • 无法解析符号'服务'
  • 无法解析符号'BeaconService'

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

<service android:name="com.estimote.sdk.service.BeaconService"
    android:exported="false"/>
Run Code Online (Sandbox Code Playgroud)

表现

<?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>
Run Code Online (Sandbox Code Playgroud)

Hes*_*pen 5

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

compile project(':estimote-sdk-preview')
Run Code Online (Sandbox Code Playgroud)