I copy whole code base of ARToolkit and try to run android studio examples but each example just crashed on start. Than I download android sdk bundle from Artoolkit website, in this only eclipse examples are included so I migrate it into android studio(using default android studio migration). Now ARSimple is running but for any example including native code it gives linking error. For exaple for ARSimpleNativeCars i got the following error while making in android studio.
Error:(49, 24) AR/gsub_es.h: No such file or directory
in order to run the native examples you need to run the build script first. Unfortunately they are currently only working on OSX and Linux. You can find them in this directory in your GitHub clone:
https://github.com/artoolkit/artoolkit5/tree/master/android
Also you can find a documentation on how to port projects from Eclipse to AS here:
https://github.com/artoolkit/artoolkit5/tree/master/AndroidStudioProjects/Docs
Related
I'm quite new to NativeScript. Currently, one of my projects is using NativeScript to develop cross-platform app. It has a 3rd-party lib which is written in java. But the result is not as good as I expected. I was struggling to find the problem since the console didn't log valuable info regarding to native code.
Instead, I import the project to Android Studio which is under the folder of platform/android. But it logs error when I hit the "run" button.
I want to know:
Is it possible to debug native code directly with VS Code. At least print out java native error or cat log.
How can I debug native code in Android Studio? How to solve the problem I ran into?
I'd be very appreciated, if anyone can answer my questions. Thanks!
Let me start off by saying there's no official integration with Android Studio. All I can provide is a workaround that will make it possible.
Note: The steps provided below are tested with NativeScript CLI 3.1.1 and will probably work also with 3.2.0.
The first problem is you don't have "node" set in your global path so first of all, you need to add it to PATH. Node required for NativeScript to run. You can look at how to set it up here
If you want to be able to run the project with Android Studio you can follow these steps:
After you've done that you need to change the <app_name>/platforms/android/build.gradle file as described here
The above change will enable you to open <app_name>/platforms/android in Android Studio
Run <app_name>:clean task from gradle
Run the task default for Android Studio, that will prompt you for emulator or device on which to run:
Update 1
I have installed the official WIN package located at PyPi repository
Just to make sure I did not miss anything, I downloaded the .whl file manually, renamed it to .zip, opened and listed all the files and directories inside this package. There is nothing related to android.
Following this question, there is now a support of TensorFlow for Windows. I installed it using the instructions provided as part of Anaconda, and it works.
However, I can't seem to find information about developing an application with TensorFlow for Android in Windows, by using Android Studio.
Currently I tried:
Downloaded the Android example from the main branch (which is for Linux), opened it in Android Studio. The following line doesn't work: import org.tensorflow.contrib.android.TensorFlowInferenceInterface;. I can't guess where to import the libraries. I've tried to read the documentation in readme.md, but it looks very Linux oriented, .sh scripts and etc.
Found the path of TensorFlow installation in Windows,
C:\Program Files\Miniconda2\envs\py35\Lib\site-packages\tensorflow\contrib\android\java, but it is completely empty.
Any idea?
My guess is the Android example, originally targeted for Linux, has not been updated to work on Windows. The TensorFlow update that supports Windows was just released last week.
I want to integrate android video chat in my app.I am trying out linphone but they just have provided source code with no documentation and no sample modules.I imported project in android studio just to get lot of errors.I did not find any tutorial on how to run it in android studio all the tutorials are outdated using eclipse.So,is there any link on to run linphone in android studio so that i can start to explore it.Please help
Did work for me on mac on this
Note :- the build script tries to read a file RELEASE.txt in the root of /ndk-bundle/. It has been removed since >= ndk 15.
You need add a RELEASE.TXT in the root with text containing following
r15c (64-bit).
Rest is all the same.
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
Where can I get a copy of Android Studio's WiFiDirectDemo source code? I see lots of tech articles with broken links to http://developer.android.com/resources/samples/WiFiDirectDemo/index.html. Much of Android documentation (such as http://developer.android.com/reference/android/net/wifi/p2p/package-summary.html) also have this broken link. I have downloaded the latest Android Studio and the SDK Manager, and I cannot find any sample/demo code within the SDK's installation directory nor the Android Studio's installation directory. A 'Net search for "WiFiDirectDemo" isn't finding much either. Has this sample code been pulled for some reason?
They changed the project name to the "Beam Large Files". This project is not using Wifi p2p.
Screenshot for Sample Project