I've tried multiple times to install and use Android Studio on an ARM Chromebook (C100P), but the installation always fails with the failed to run mksdcard tool
error. I've read that this happens because Android Studio depends on native binaries that aren't compatible with the ARM processor architecture; even after attempting various hacks or just trying to use the libraries alone, I am still not able to setup Android Development Environment on my ARM Chromebook.
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
Native Conclusion:
I've come to the conclusion that you really just can't. Android's compilation tools depend upon native libraries; specifically,
lib32stdc++6
andlib32z1
. These depend upon 32-bit Intel binaries, so there's no chance of executing these instruction words on an ARM processor (not even with i386 multiarch support) until Google starts making some changes.Luckily, I'm here to present a workaround. We're going to delegate computation to a virtual machine; one that is compatible with these binaries. It'll be free and secure, so you don't have to worry about who gets access to your source code. We're going to achieve this using the Google App Engine.
Workaround:
I'm going to start this tutorial assuming we're using a fresh installation.
First, download the latest Crouton installer so we have a full-fledged Ubuntu distribution to work with. Within the Chromebook shell (Ctrl + Alt + T and enter
shell
), execute the installer. I chose to install the latest version of Ubuntu, Xenial, without a window manager. I also enabled integration with the Crouton Chrome extension to enable a shared clipboard.sudo sh ~/Downloads/crouton -r xenial -t touch,audio,keyboard,extension
Next,
enter-chroot
into Ubuntu, and install curl and python:sudo apt-get update
sudo apt-get install curl python git
Use curl to fetch the Google Cloud SDK. You may extract it to the default location
~/google-cloud-sdk
, or another directory you'd like.curl https://sdk.cloud.google.com | bash
~/.bashrc
file.logout
orexit
, then re-enter usingsudo enter-chroot
. This enables your Google Cloud SDK installation to be accessible from the command line.gcloud auth login
. This will require you to do two things; first, enable the SDK to access your Google Account. Secondly, you'll be required to copy a verification key from your browser at a supplied web address, which you'll need to paste back into the console.Launch the Google Cloud Console's terminal in your web browser. Next, make a clone of your repository within both the Google Cloud Console terminal and your local Chromebook shell.
gcloud init
gcloud config set project project-name-here
gcloud source repos clone repo-name-here
wget https://dl.google.com/android/repository/tools_r25.2.3-linux.zip
unzip tools_r25.2.3-linux.zip
export ANDROID_HOME=path/to/unzipped/tools
.bashrc
to persist the installation across new server instances.sudo apt-get install lib32stdc++ lib32z1
sudo apt-get install android-sdk-platform-tools-common android-tools-adb android-tools-adbd android-tools-fastboot
Design Flow
And that's everything! If you've followed these steps correctly, you'll have successfully configured one of Google's virtual machines for Android compilation. Via the Google Cloud Console terminal, it's possible to add Android platform support for various API Levels you wish to compile for.
Here, we add API Level 25, and the Android Support Repositories, as follows:
./android update sdk --filter android-25 --no-ui
./android update sdk -u -a -t android-25
./android update sdk --all --filter "extra" --no-ui
Now, using
git pull origin master
andgit push origin master
, you can upload code developed on your Chromebook onto the repository where it may be compiled by the Android SDK. You can do this by executing the project's localgradlew
file, i.e../gradlew build
.Once compiled, you may
pull
the generated binaries back onto your development machine and configure connected Android devices using the Android Device Bridge (adb
), usingadb install path/to/apk
.