JavafxPorts - Android N - javafxports

I am trying to install and test my app on a Pixel C which is running Android N. The android monitor (in Intellij) is showing the Pixel C and is showing log output from the tablet.
However, when I try installing the app, I get an error:
Caused by: org.gradle.api.GradleException: Failed to install on any devices.
at org.javafxports.jfxmobile.plugin.android.task.Install.install(Install.groovy:58)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.doExecute(AnnotationProcessingTaskFactory.java:227)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:220)
at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$StandardTaskAction.execute(AnnotationProcessingTaskFactory.java:209)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:585)
at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:568)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:80)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:61)
Any suggestions on how I can get my app installed and running on Android N? Do I have to downgrade my Pixel C to Android 6 to get the app to install?
Thanks!

While Android N is just a beta, JavaFXPorts doesn't provide support for it yet, but it is on the short-term roadmap.

Related

IntelliJ IDEA suddenly won't open on Mac "Error occurred during initialization of VM"

IntelliJ IDEA suddenly wouldn't open on my Mac (Intel). The app icon bounces but then nothing happens—no crash report or any kind of message—and there's nothing in Activity Monitor or ps.
Then I tried running it from terminal and got this:
$ /Applications/IntelliJ\ IDEA.app/Contents/MacOS/idea
2023-02-08 07:47:52.953 idea[10131:63714] allVms required 1.8*,1.8+
2023-02-08 07:47:52.955 idea[10131:63717] Current Directory: /Applications/IntelliJ IDEA.app/Contents/MacOS
2023-02-08 07:47:52.955 idea[10131:63717] Value of IDEA_VM_OPTIONS is (null)
2023-02-08 07:47:52.955 idea[10131:63717] fullFileName is: /Applications/IntelliJ IDEA.app/Contents/bin/idea.vmoptions
2023-02-08 07:47:52.955 idea[10131:63717] fullFileName exists: /Applications/IntelliJ IDEA.app/Contents/bin/idea.vmoptions
2023-02-08 07:47:52.956 idea[10131:63717] Processing VMOptions file at /Applications/IntelliJ IDEA.app/Contents/bin/idea.vmoptions
2023-02-08 07:47:52.956 idea[10131:63717] Done
Error occurred during initialization of VM
java.lang.NoClassDefFoundError: com/intellij/util/lang/UrlClassLoader
at java.lang.ClassLoader.defineClass1(java.base#11.0.13/Native Method)
at java.lang.ClassLoader.defineClass(java.base#11.0.13/ClassLoader.java:1017)
at java.security.SecureClassLoader.defineClass(java.base#11.0.13/SecureClassLoader.java:174)
at jdk.internal.loader.BuiltinClassLoader.defineClass(java.base#11.0.13/BuiltinClassLoader.java:800)
at jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(java.base#11.0.13/BuiltinClassLoader.java:698)
at jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(java.base#11.0.13/BuiltinClassLoader.java:621)
at jdk.internal.loader.BuiltinClassLoader.loadClass(java.base#11.0.13/BuiltinClassLoader.java:579)
at jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(java.base#11.0.13/ClassLoaders.java:178)
at java.lang.ClassLoader.loadClass(java.base#11.0.13/ClassLoader.java:522)
at java.lang.Class.forName0(java.base#11.0.13/Native Method)
at java.lang.Class.forName(java.base#11.0.13/Class.java:398)
at java.lang.ClassLoader.initSystemClassLoader(java.base#11.0.13/ClassLoader.java:1976)
at java.lang.System.initPhase3(java.base#11.0.13/System.java:2074)
Caused by: java.lang.ClassNotFoundException: com.intellij.util.lang.UrlClassLoader
at jdk.internal.loader.BuiltinClassLoader.loadClass(java.base#11.0.13/BuiltinClassLoader.java:581)
at jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(java.base#11.0.13/ClassLoaders.java:178)
at java.lang.ClassLoader.loadClass(java.base#11.0.13/ClassLoader.java:522)
at java.lang.ClassLoader.defineClass1(java.base#11.0.13/Native Method)
at java.lang.ClassLoader.defineClass(java.base#11.0.13/ClassLoader.java:1017)
at java.security.SecureClassLoader.defineClass(java.base#11.0.13/SecureClassLoader.java:174)
at jdk.internal.loader.BuiltinClassLoader.defineClass(java.base#11.0.13/BuiltinClassLoader.java:800)
at jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(java.base#11.0.13/BuiltinClassLoader.java:698)
at jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(java.base#11.0.13/BuiltinClassLoader.java:621)
at jdk.internal.loader.BuiltinClassLoader.loadClass(java.base#11.0.13/BuiltinClassLoader.java:579)
at jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(java.base#11.0.13/ClassLoaders.java:178)
at java.lang.ClassLoader.loadClass(java.base#11.0.13/ClassLoader.java:522)
at java.lang.Class.forName0(java.base#11.0.13/Native Method)
at java.lang.Class.forName(java.base#11.0.13/Class.java:398)
at java.lang.ClassLoader.initSystemClassLoader(java.base#11.0.13/ClassLoader.java:1976)
at java.lang.System.initPhase3(java.base#11.0.13/System.java:2074)
I tried various things I read online:
I tried removing idea.vmoptions in /Applications/IntelliJ\ IDEA.app/Contents/MacOS/ as well as ~/Library/Application\ Support/JetBrains/<product>/.
I restored them but checked that -Xmx was not smaller than -Xms.
I tried deleting plugins.
I tried restoring the JDK and messing with PATH and environment.
Possible causes were updating from macOS Ventura 13.1 to 13.2 yesterday. Or, installing the bined plugin yesterday.
Self-answering to help people. Try simply upgrading to the latest IntelliJ IDEA.
For some reason it was the last thing I tried, i.e. downloading the latest .dmg and installing (dragging into Applications and replacing previous version). I was on Ultimate so I downloaded Ultimate, but if you're on CE (Community Edition) you should download that. I guess in the past upgrading IntelliJ caused things to break for me, so I avoided it until I tried everything else. But this time it was the solution. Also for some reason none of the threads I read online mentioned this as the solution—maybe too obvious but hey, I would have tried it sooner if I read it.

Nativescript - cannot run android on device

I used to be able to run on android and all of a sudden I am getting this error (see below).
The only thing I recall changing is downgrading "nativescript-ui-listview" to "^7.1.0" and "nativescript-ui-sidedrawer" to "~7.0.0" because it otherwise breaks on ios 12.
Webpack compilation complete. Watching for file changes.
Webpack build done!
Project successfully prepared (android)
Installing on device f180a829...
More than one .apk found in /Users/manuelmaestrini/Programming/spiio-development/spiiomobile/platforms/android/app/build/outputs/apk directory. Using the last one produced from build.
Successfully installed on device with identifier 'f180a829'.
Application com.spiio.mobile is not running on device f180a829.
This issue may be caused by:
* crash at startup (try `tns debug android --debug-brk` to check why it crashes)
* different application identifier in your package.json and in your gradle files (check your identifier in `package.json` and in all *.gradle files in your App_Resources directory)
* device is locked
* manual closing of the application
Unable to apply changes on device: f180a829. Error is: Application com.spiio.mobile is not running.
Any idea what might be? I tried to do --clean, remove node_modules, hooks, platforms, uninstall and reinstall webpack etc but no luck...

Android Device Manage throws error in Visual Studio 2017

Whenever I try to create a new virtual device in Android Device Manager from Visual Studio, I get the following error:
AVD CREATION ERROR: AVD failed to create with error : AVD Manager has returned non-zero exit code: 1. Please check logs for more information.
From logs, I found the following snippet which is probably the error:
[18-05-12 10:45:44.76] [AvdManager.CreateAvd] AVD Manager has returned non-zero exit code: 1
Command: C:\Program Files (x86)\Android\android-sdk\tools\bin\avdmanager.batcreate avd -n my_device -k system-images;android-25;google_apis_playstore;x86 --tag google_apis_playstore --abi x86 -d Nexus 5X --sdcard 100M
Details: Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema
at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)
at com.android.repository.api.SchemaModule.<init>(SchemaModule.java:75)
at com.android.sdklib.repository.AndroidSdkHandler.<clinit>(AndroidSdkHandler.java:81)
at com.android.sdklib.tool.AvdManagerCli.run(AvdManagerCli.java:213)
at com.android.sdklib.tool.AvdManagerCli.main(AvdManagerCli.java:200)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499)
... 5 more
It happens no matter whatever configuration or version of Android I use.
Details:
OS: Windows 10 Professional x64
Processor: Ryzen 1700
Uninstalling all other versions of JAVA SDK except SDK 8 done the work for me.
My current JAVA SDK's:

Xamarin Android Native/Forms build success but deployment failed on both emulator/device in Windows 10

I tired xamarin native android and forms but both does seems to work. Both gives errors.
Tried creating blank xamarin android app without any code written in it, tired with xamarin forms app. Did a build, rebuild, clean, restarted system, restarted visual studio, running vs as admin all possible things but nothing worked out.
Below is the Device Log Information
Time Device Name Type PID Tag Message
10-13 23:18:30.003 Motorola XT1068 Error 19565 AndroidRuntime java.lang.RuntimeException: Unable to get provider mono.MonoRuntimeProvider: java.lang.RuntimeException: Unable to find application Mono.Android.DebugRuntime!
at android.app.ActivityThread.installProvider(ActivityThread.java:5177)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4769)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4709)
at android.app.ActivityThread.-wrap1(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1415)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5443)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
Time Device Name Type PID Tag Message
10-13 23:18:30.003 Motorola XT1068 Error 19565 AndroidRuntime Caused by: android.content.pm.PackageManager$NameNotFoundException: Mono.Android.DebugRuntime
at android.app.ApplicationPackageManager.getApplicationInfo(ApplicationPackageManager.java:304)
at mono.MonoRuntimeProvider.attachInfo(MonoRuntimeProvider.java:41)
... 11 more
Time Device Name Type PID Tag Message
10-13 23:18:30.003 Motorola XT1068 Error 19565 AndroidRuntime Caused by: java.lang.RuntimeException: Unable to find application Mono.Android.DebugRuntime!
at mono.MonoRuntimeProvider.attachInfo(MonoRuntimeProvider.java:47)
at android.app.ActivityThread.installProvider(ActivityThread.java:5174)
... 10 more
Below is the Output information
2>An existing connection was forcibly closed by the remote host
2>Done building project "demoapp.csproj".
2>Build succeeded.
2>An existing connection was forcibly closed by the remote host
2>
2>Deploy failed on Motorola XT1068
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
========== Deploy: 0 succeeded, 1 failed, 0 skipped ==========
System Information:
Windows 10 Operating System
Microsoft Visual Studio Enterprise 2017
Version 15.4.0
VisualStudio.15.Release/15.4.0+27004.2002
Microsoft .NET Framework
Version 4.7.02046
Xamarin 4.7.10.22
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin.Android SDK 8.0.0.33
Xamarin.Android Reference Assemblies and MSBuild support.
Xamarin.iOS and Xamarin.Mac SDK 11.2.0.8
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
After changing to x86 and to release mode, now able to run in emulator. Below is the image.
But still not able to run on Android Devices
Edited
Android csproj file contents
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SelectedDevice>Motorola XT1068</SelectedDevice>
<DefaultDevice>5" KitKat %284.4%29 XXHDPI Phone</DefaultDevice>
<AndroidDesignerPreferredDevice>Nexus 4</AndroidDesignerPreferredDevice>
</PropertyGroup>
</Project>
Android Project Properties

How to get a simple app deployed on watchOS 3 with Xamarin?

I can't get a simple app to run on watchOS 3 and it's driving me CRAZY!
I'm running with Xcode 8.
Recreate scenario: Create a newiOS app (defaults to deployment target 10), add WatchOS project (3.0). Try to compile.
I get:
Could not AOT the assembly (MT3001)
Changing Build link to "Don't Link" on all three projects and downgrading to target 8.4 and Watch OS 2.2 results:
Error MT1006: Could not install the application on the device: Sent message error( error : 0xe800002d).
Changing to target 10, but keeping Watch OS 2 finally gets compiled and installed on the phone and deployed on device, but debugger either:
A. Never manage to connect over Wifi to the watch (stuck at "waiting for the app to connect on port 10000)
B. Get the following error:
Launched watch application 'com.XXX.testwatch.watchkitapp' on 'Apple Watch' with pid 270
Exception: Xamarin.Hosting.MobileDeviceException: Send Message Error (error: 0xe800002d)
at Xamarin.Hosting.RealDevice.StartSession () <0x118c24dd0 + 0x0009d> in :0
at Xamarin.Hosting.DebugService+c__AnonStorey6.<>m__0 (System.Object v) <0x118c24450 + 0x000cf> in :0
[MVID] 703d5be3b466420882f6cb97c41b6723 0,1
What am I doing wrong here?
I've submitted a bug report To Xamarin. They confirmed. You need to modify the default compilation to disable the incremental build.

Resources