是否需要先连接raspberry pi 3 与adb 然后开发android things 项目

Is it necessary to first connect raspberry pi 3 with adb then develop the android things project

我是 android 的新手。最近我尝试在 android studio 2.3.3 上使用 25 SDK 构建一个 android things 应用程序。

但是当我将 android things 支持库包含到应用程序模块 build.gradle 文件的依赖项中并与最新的 gradle 更改同步时,它给我以下错误:

"Install repository then Sync"

请有人帮助我。

您无需连接 Raspberry Pi 即可开发 Android Things 项目。 在开发 Android 事物时,您必须牢记三点​​:

  • 将您的 SDK 工具更新到版本 25.0.3 或更高版本。
  • 使用 Android 8.0 (API 26) 或更高版本更新您的 SDK。
  • 为了访问 Things 的新 APIs,您必须创建一个项目或修改一个目标为 Android 8.0(API 级别 26)或更高版本的现有项目。 添加库。

在您的情况下,您需要安装最新的构建工具和存储库来开发 Android Things 项目。 您的 build.gradle 应如下所示:

apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"

defaultConfig {
    applicationId "com.android.androidthings.id"
    minSdkVersion 21
    targetSdkVersion 26
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}
dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        testCompile 'junit:junit:4.12'
        compile 'com.android.support:appcompat-v7:25.3.1'
        provided 'com.google.android.things:androidthings:0.3-devpreview'
}