Unable to compile a python script using buildozer - windows

I am using win 32 python 2.7 and kivy 1.8.0 but on compiling using buildozer for creating an Android app it is showing the following error:
C:\Python27\Scripts>buildozer android debug deploy
I check configuration tokens
Unknown command/target android

Although buildozer works on Windows, python-for-android does not. You need to use OSX or Linux to make an APK with Kivy. Kivy provides a Linux virtual machine for your convenience.

Related

Build Tensorflow lite for Mac Catalyst

I'm fairly new to cross-compilation. I am developping a Swift App with a c++ backend that uses the tensorflow static lib on a Mac M1, I succeeded in compiling my own code to mac catalyst with meson.
But now I am struggling to compile the tensorflow static lib with bazel, and I didn't find any useful resources to help me in my task. I saw that apparently bazel does supports catalyst building.
I tried this command (among others):
bazel build -c opt --apple_platform_type catalyst //tensorflow/lite:libtensorflowlite.so
But I got this error that I don't fully understand:
error bazel build for mac catalyst
Any advice would be welcome !
Building TensorFlow Lite for Mac Catalyst involves several steps.
Install Xcode and the Mac Catalyst SDK:
Download and install Xcode from the Mac App Store.
In Xcode, open the Preferences window and go to the Components tab.
Install the Mac Catalyst SDK.
Clone the TensorFlow repository:
Open a Terminal window.
Clone the TensorFlow repository: git clone https://github.com/tensorflow/tensorflow.git
Navigate to the root directory of the TensorFlow repository: cd tensorflow
Configure the build:
Run the configuration script: ./configure
Select the appropriate options for your environment. For example, you may need to specify the location of the Xcode command line tools.
Build TensorFlow Lite:
Run the build command: bazel build --config=catalyst //tensorflow/lite:tensorflowlite.framework
This will build the TensorFlow Lite framework for Mac Catalyst.
Verify the build:
Navigate to the bazel-bin/tensorflow/lite directory: cd bazel-bin/tensorflow/lite
Verify that the tensorflowlite.framework directory exists.
You can now use the tensorflowlite.framework in your Mac Catalyst project. Note that you may need to modify your project settings to include the TensorFlow Lite framework and any other dependencies that it requires.

How can I get MacOS to run the VTK window over ssh

I am trying to open a VTK render on a local machine through ssh. I am using pyvista to make the render, which is being run from a python script on a remote machine.
Local machine (where I want to see the render): MacOS Catalina 10.15
Remote machine: Ubuntu 18.04
To run the script I first ssh into the remote machine and then run, i.e.
ssh -Y <username>#remotehost.com
python script.py
However when I run this I get the following error:
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
ERROR:root:GL version 2.1 with the gpu_shader4 extension is not supported by your
graphics driver but is required for the new OpenGL rendering backend. Please update
your OpenGL driver. If you are using Mesa please make sure you have version 10.6.5
or later and make sure your driver in Mesa supports OpenGL 3.2.
[1] 21692 segmentation fault (core dumped) python script.py
Based on several posts online I have tried the following setting:
defaults write org.macosforge.xquartz.X11 enable_iglx -bool true
On MacOS I have installed mesa==20.0.2 and mesalib-glw==8.0.0
The issue appears to be that MacOS is using OpenGL==2.1, but should instead be using version 3.2+. This is confirmed with I run:
$ glxinfo|grep OpenGL
OpenGL vendor string: ATI Technologies Inc.
OpenGL renderer string: AMD Radeon Pro 560X OpenGL Engine
OpenGL version string: 2.1 ATI-3.8.24
OpenGL shading language version string: 1.20
OpenGL extensions:
How can I get MacOS to run the VTK window over ssh? I The script runs fine if I run it locally. Also, it runs fine if I run it on the remote only. It's only when I try to run it remotely and view in locally I have this issue. Is it a matter of either changing the default OpenGL version or upgrading somehow?
I solved this using VirtualGL.
VirtualGL server works for Ubuntu 18.04 and VirtualGL client for MacOS Catalina (10.15.4).

Nativescript doctor throws warnings and errors

I want to connect my virtual android device to nativescript sidekick.
When I open NativeScript Sidekick and click on "Virtual Device Launcher" Button, I get the following error message.
[20-03-24 09:50:23.966] Unable to execute avdmanager, ensure JAVA_HOME is set and points to correct directory
So I ran tns doctor:
TIP: To avoid setting up the necessary environment variables, you can use the chocolatey package manager to install the Android SDK and its dependencies.
There seem to be issues with your configuration.
Component nativescript has 6.5.0 version and is up to date.
Your ANDROID_HOME environment variable is set and points to correct directory.
WARNING: WARNING: adb from the Android SDK is not installed or is not configured properly.
For Android-related operations, the NativeScript CLI will use a built-in version of adb.
To avoid possible issues with the native Android emulator, Genymotion or connected
Android devices, verify that you have installed the latest Android SDK and
its dependencies as described in http://developer.android.com/sdk/index.html#Requirements
WARNING: WARNING: The Android SDK is not installed or is not configured properly.
You will not be able to run your apps in the native emulator. To be able to run apps
in the native Android emulator, verify that you have installed the latest Android SDK
and its dependencies as described in http://developer.android.com/sdk/index.html#Requirements
WARNING: Cannot find a compatible Android SDK for compilation. To be able to build for Android, install Android SDK 28 or later.
Run `$ sdkmanager` to manage your Android SDK versions.
WARNING: You need to have the Android SDK Build-tools installed on your system. You can install any version in the following range: '>=23 <=29'.
Run `$ sdkmanager` from your command-line to install required `Android Build Tools`. In case you already have them installed, make sure `ANDROID_HOME` environment variable is set correctly.
WARNING: Error executing command 'javac'. Make sure you have installed The Java Development Kit (JDK) and set JAVA_HOME environment variable.
You will not be able to build your projects for Android.
To be able to build for Android, verify that you have installed The Java Development Kit (JDK) and configured it according to system requirements as
described in http://docs.nativescript.org/setup/ns-cli-setup/ns-setup-win.html#system-requirements
WARNING: WARNING: The Java Development Kit (JDK) is not installed or is not configured properly.
You will not be able to work with the Android SDK and you might not be able
to perform some Android-related operations. To ensure that you can develop and
test your apps for Android, verify that you have installed the JDK as
described in http://docs.oracle.com/javase/8/docs/technotes/guides/install/install_overview.html (for JDK 8).
Local builds for iOS can be executed only on a macOS system. To build for iOS on a different operating system, you can use the NativeScript cloud infrastructure.
Your environment is not configured properly and you will not be able to execute local builds. To continue, choose one of the following options:
Run $ tns preview command to enjoy NativeScript without any local setup.
Run $ tns setup command to run the setup script to try to automatically configure your environment for local builds.
In order to test your application use the $ tns login command to log in with your account and then $ tns cloud build command to build your app in the cloud.
Verify that your environment is configured according to the system requirements described at http://docs.nativescript.org/setup/ns-cli-setup/ns-setup-win.html#system-requirements.
Android Studio Says Android SDK-Tools are installed:
ANDROID_SDK_HOME is in my environment variables (user):
JAVA_HOME is in my environment variables (system):
When I open cmd and run javac -version I get javac 1.8.0_131
adb devices says List of devices attached (works fine)
First option I suggest to you is to run sdkmanager in the command line and try tns run again.
For setting the java_home path this is a link : Setting JAVA_HOME at Android SDK
Second option you may need to change the path of ANDROID_HOME: for example this is mine
C:\Users\USERNAME\AppData\Local\Android\Sdk note the sdk at the end of the path

How to compile OpenThread examples on Mac OS?

How can I compile the OpenThread examples on Mac OS?
The scripts supplied in the repository do not work, because they use apt-get which is not available in Mac OS.
Is there some kind of guide on how this can be achived (either compiling natively or in a VM or container)?
This PR seeks to add Mac (i.e. brew) support to the setup script: https://github.com/openthread/openthread/pull/2332

sqlite in the xamarin android player

I have clicked on Tools -> Android -> Android Device Monitor in VS 2015 and got the following error, but my xamarin android player works fine.
Is there a way to access to local database (sqlite) in the xamarin android player simulator not on the physical device?
Update:
I am using adb and getting the following error
Failed to load the JNI shared library "C:/XXXXX/jvm.dll"`.
This is a sign of a mixed 32/64 Java bit Java install and/or the wrong version is installed.
Xamarin on Windows requires a Windows x86 version of v1.7
It is essential to install the 32-bit version of the Java JDK even if you're using 64-bit Windows. It is also important that v1.7 of the Java JDK is installed (although it is fine to have 1.8 or newer installed at the same time).
So I would start by installing Java v1.7, since the error is pointing to v1.6 and retrying to open the Android Device Monitor.
Installing the Java SDK (JDK)
The JDK can be downloaded from any browser by visiting Oracle’s website and browsing to the section with the heading Java SE Development Kit 7u79
Ref: https://developer.xamarin.com/guides/android/getting_started/installation/windows/manual_installation/#Installing_the_Java_SDK_JDK
Solution 1:
I run tools->android-> android adb command prompt in visual studio
I have followed the followings to access the database
step1. >adb shell
step2. >cd data/data
step3. >ls -l|grep "com.xxxx"
step4. >cd "com.xxxx"
Then I used the following to copy sql file to my workstation
adb shell "run-as com.xxxx chmod 666 /data/data/com.xxxx/files"
adb pull /data/data/com.xxxx/files/xx.sql
adb shell "run-as com.xxxx chmod 600 /data/data/com.xxxx/files"
Then I have downloaded sqlite browser to open the file and see the tables.
Solution 2:
Alternatively, you can go to following directory and double click the exe file
C:\Users\XXXXX\AppData\Local\Android\ANDROI~1\tools\lib\monitor-x86_64\monitor.exe

Resources