Getting Android Sdk Tools to Work on Raspberry Pi

Getting Android SDK Tools to work on Raspberry PI

First, you have to look in your /usr/share/java folder, for the file swt.jar
If that doesn't work, try:

sudo apt-get install libswt-gtk-3-java

Which will put swt-gtk-3.8.0.jar in the /usr/share/java folder.

Create the folder /home/pi/android-sdk-linux/tools/lib/arm

Then, copy whichever file you chose, (swt-gtk-3.8.0.jar, or swt.jar) and place it in your /home/pi/android-sdk-linux/tools/lib/arm folder. This worked for me, and I hope it will also work for you.

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

You don't need to connect Raspberry Pi to develop a Android Things project.
There are three points which you have to keep in mind while developing for Android Things:

  • Update your SDK tools to version 25.0.3 or higher.
  • Update your SDK with Android 8.0 (API 26) or higher.
  • In order to access new APIs for Things, you must create a project or modify an existing project that targets Android 8.0 (API level 26) or higher.
    Add the library.

In your case, you need to install the latest bulid tools, and repositories to develop an Android Things Project.
Your build.gradle should look like this:

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


Related Topics



Leave a reply



Submit