使Android SDK工具在Raspberry PI上运行 [英] Getting Android SDK Tools to work on Raspberry PI

查看:207
本文介绍了使Android SDK工具在Raspberry PI上运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在尝试在Raspberry PI 2上开始为Android开发.我已经排除了使用IDE(例如Eclipse或Android Studios)的可能性(是的,我知道RPI甚至不打算运行它),因此我现在正在考虑从命令行进行开发.

I am currently attempting to start developing for Android on the Raspberry PI 2. I have already ruled out the posibility of using an IDE such as Eclipse or Android Studios (yes I know the RPI isn't even meant to be able to run it) so I am now looking at developing from the command line.

我到目前为止所拥有的:

What I have so far:

  • 带手臂的adb
  • 蚂蚁工具(& pand工具)

现在我需要拥有的是独立SDK中包含的android可执行文件.我已经从(android-studio-ide-135.1641136-linux.zip)下载了它.但是,当我尝试在命令行中运行android可执行文件时,出现以下错误:

Now all I need to have is the android executable which is contained in the stand-alone SDK. I have downloaded it from this source (android-studio-ide-135.1641136-linux.zip). However, when I try to run the android executable in the command line I get the following error:

SWT folder '/home/pi/android-sdk-linux/tools/lib/arm' does not exist.
Please export ANDROID_SWT to point to the folder containing swt.jar for your platform.

当我从android文件运行任何命令时.

when I run any command from the android file.

我不知道该怎么做或如何解决它,因为对于RPI和Linux的任何方面,我都是一个完全的菜鸟.关于如何解决这个问题的任何指示?谢谢.

I have no idea what to do or how to fix it as I am a complete noob when it comes to the RPI and anything with Linux in general. Any pointers as to how to fix this? Thanks.

推荐答案

首先,您必须在/usr/share/java文件夹中查找文件swt.jar. 如果那不起作用,请尝试:

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

这会将swt-gtk-3.8.0.jar放在/usr/share/java文件夹中.

创建文件夹/home/pi/android-sdk-linux/tools/lib/arm

然后,复制您选择的任何文件(swt-gtk-3.8.0.jarswt.jar)并将其放置在/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.

这篇关于使Android SDK工具在Raspberry PI上运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆