Robolectric "WARNING: Unable to find path to Android SDK" - android

I am using Robolectric without using maven to build, meaning I am using the Robolectric-with-dependencies Jar.
I set it up based on instructions on Robolectric's site, yet I am still getting the WARNING: Unable to find path to Android SDK" error. I found this link (the first answer) which mentions where the problem is coming from but doesn't answer how I can fix this problem.
I am new and never posted because I can usually find a solution after browsing for awhile, however I had no luck finding the solution. Anything would help. Thanks.

make sure to set the ANDROID_HOME environment variable to point to your Android SDK installation, e.g.:
export ANDROID_HOME=/usr/local/Cellar/android-sdk/r15

Stefan is correct.
More information can be found in my chapter about Android development with Maven as well as the plugin wiki and documentation for the sdk configuration. I would also recommend to use the latest version of the android maven plugin as well as the Android SDK..

Related

Can I completely remove android support for my LittleKT project?

I am trying to create a LittleKT project in Visual Studio Code. I tried building a Gradle instance of the project but was told that I did not have an Android SDK. I installed the Android SDK Tools and got pretty far. I was unable to use a key emulator that I needed and was wondering if I could completely remove android support for my project.
Any advice pertaining to LittleKT or how to install the needed emulator I need would be greatly appreciated. I did not include many details as to doing that because that is not the point of this question. Plus, there are plenty of discussions pertaining to that issue.
Thanks

TensorFlow Android demo: unable to build with Bazel, could not read RELEASE.TXT

Recently I've been learning how to use TensorFlow, and wanted to set up the Android demos on my computer to see how they worked. I followed the instructions provided here, with the only differences being that I installed the Android SDK through Android Studio, and installed the Android NDK through the SDK Manager. Up until $ bazel build //tensorflow/examples/android:tensorflow_demo, everything worked fine, but after that, I got this error from the terminal:
ERROR: no such package '#androidndk//': Could not read RELEASE.TXT in Android NDK: /home/me/.cache/bazel/_bazel_me/f3471be34d1e62bf21975aa777cedaa3/external/androidndk/ndk/RELEASE.TXT (No such file or directory).
ERROR: no such package '#androidndk//': Could not read RELEASE.TXT in Android NDK: /home/me/.cache/bazel/_bazel_me/f3471be34d1e62bf21975aa777cedaa3/external/androidndk/ndk/RELEASE.TXT (No such file or directory).
From looking around at similar issues, my understanding is that this error is because the RELEASE.TXT file isn't included in the most recent version of Android NDK. This issue suggested downgrading to a previous version of NDK which contains a RELEASE.TXT file, and provided links to download such versions. However, the link that I followed (https://dl.google.com/android/ndk/android-ndk-r10e-linux-x86_64.bin) downloaded a .bin file, which is unusable to me. That post also suggested commenting out the NDK entry in the WORKSPACE file, but I haven't tried that yet, since I don't know if it will cause further complications down the road.
Another approach that I've tried is going to the path indicated by the error log (/home/me/.cache/bazel/_bazel_me/f3471be34d1e62bf21975aa777cedaa3/external/androidndk/ndk) and creating a blank RELEASE.TXT file, which made no difference. (I wasn't able to create one in the NDK that I installed, since it was in the form of a .jar file at the path /home/me/android-studio/android-studio/plugins/android-ndk/lib, thus the only way I could see was this path.)
As it stands, I'm at a dead end. Is there another way to resolve this issue without downgrading or commenting out the NDK entry? If not, how can I install a previous version of Android NDK?
I also posted this as issue #3175 in the official GitHub repository for TensorFlow, and it's been resolved. A play-by-play of the steps I followed to solve the problem can be found in that thread. It's a bit convoluted, so the steps I believe will solve an issue like this are as follows:
If you didn't use the --recursive option when git cloning the TensorFlow repository, re-clone it using that.
Downgrade to Android NDK r11c (and make sure to update the WORKSPACE file accordingly). A link for the Linux version can be found in the GitHub thread.
Check the version of your Android SDK and build tools. If they differ from the default versions written in the WORKSPACE file, make sure to change that.
You may run into a TensorFlow issue that is, as of yet, unresolved. (#3374) If so, run ./configure as a workaround.
And that should allow the Bazel build to proceed successfully.
Have you looked at using an alternative way to compile TensorFlow for Android without using Bazel? It's described in TensorFlow Makefile

How to fix titanium ERROR: Asset package include titanium.jar not found

Well, I have configured the emulator, the paths in the studio, everything seems to be ok, but i can't make it works.
Not sure if this is still an issue but certain version of titanium does not support Android build tools above a certain version like explained here:
https://developer.appcelerator.com/question/178514/
So you could check this and check if your titanium is up to date.

Qt for android doesn't find any compatible devices answer found but dont know how

Well I am complete new to Qt and to make it simple and easy, this person had the same issue
Qt for android doesn't find any compatible devices
They seem to fix it by someone saying
You can overcome this problem by:
In QtCreator -> Projects -> BuildEnvironment add the variable
ANDROID_TARGET_ARCH=default/armeabi-v7a
But when I click File, new and I dont see any of the options.
The solution provided in the post you mentioned is no longer required. You can download and install the newest version of Qt Creator (currently Qt Creator 3.1). This issue has been fixed in the recent version as you can see Here. So there is no need to make a build environment variable.

android scala and eclipse

I tried following the instructions here link text to make a scala application. However when I run the "ant install" command I get the following error
aaptexec doesn't support the "basename" attribute
I read this is because of the new sdk 7 version here. However noone on that thread seems to offer any solution.
Has anyone tried to do this with the new sdk?
Thanks in advance
You may take a look at Building Android apps in Scala with sbt, I found it is much easier to use SBT to build Scala/Andoird application than Eclipse.
You should also use https://github.com/steve918/android-plugin instead of the plug-in describe at the page if you want use latest Android SDK.
http://code.google.com/p/treeshaker/ may be what you're looking for.
It's a build step for Eclipse which, used together with Scala IDE, will enable you to use Scala on Android.
Solution found here to use the latest Android SDK, with Eclipse 3.7.2 and Scala 2.9 :
https://stackoverflow.com/a/11084146/1287856
It compiles under Android SDK 18
It does not have the strange side-effects of Treeshaker like forgetting to include some classes.

Categories

Resources