Getting Android SDK Tools to work on Raspberry PI

家住魔仙堡 提交于 2019-12-04 09:34:08

问题


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:

  • An arm ported adb
  • Ant tools ( & pand tools )

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.

when I run any command from the android file.

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.


回答1:


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.



来源:https://stackoverflow.com/questions/28551497/getting-android-sdk-tools-to-work-on-raspberry-pi

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!