JavaFX for Android - gradle build property not found - java

I am using this guide to try and port my JavaFX application to Android.
I have downloaded and installed all the things that the guide says I need but when I run the command:
gradle -PDEBUG -PDIR=/home/josh/cs335Android -PNAME=AndroidTimeline -PPACKAGE=src -PJFK_SDK=/home/josh/android-sdk -PJFX_APP=/home/josh/git/TimelinePhaseTwo -PJFX_MAIN=src/gui/Driver createProject
it says:
A problem occurred evaluating root project '***android-tools***'.
Cause: Could not find property '***ext***' on task '***:conf***'."
I think this is because I am not properly supplying the parameters to gradle (as described in the guide) but I don't actually know how to do that. Are those something that I write in the build.gradle file?

Related

Error on Intellij Idea when trying to run a kotlin project

Im getting this error. What I was doing was the code I want to run didnt run rather it showed up the Edit Configurations
The error: Failed to download Amazon Corretto 18.0.2. EventQueue.isDispatchThread()=false Current thread: Thread[ApplicationImpl pooled thread 110,4,main] 2031890033 SystemEventQueueThread: Thread[AWT-EventQueue-0,6,main] 1808191328
This was what I was trying to fix: Image Cannot access 'java.io.Serializable' which is a supertype of 'kotlin.Array'. Check your module classpath for missing or conflicting dependencies
And it says that the JDK "corretto-18" is not found on the disk or corrupted.
Im using: IntelliJ up to date, Java 18
Does anyone has a solution for this issue??
Thanks-

Flurry CN1Lib error after submitting Android build

I am getting error 'Caused by: org.gradle.process.internal.ExecException: Process 'command '/home/ec2-user/jdk1.8.0_45/bin/java'' finished with non-zero exit value 2' when submitting an Android build request.
I suspect it has got to do with Flurry CN1Lib
* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':transformClassesWithDexForRelease'.
Caused by: java.lang.RuntimeException: com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: Error while executing java process with main class com.android.dx.command.Main with arguments {--dex --verbose --force-jumbo --num-threads=4 --output
The flurry cn1lib needs to be updated to use the newer Android API level 28 for location which is our current default. That's the right thing to do for the long term.
As a short term patch you might be able to define: android.playServicesVersion=8.3.0 in the build hints to work around this. Notice that this might impact the functionality of your app such as location services support etc.
Well, I finally managed to fix this issue. I was only interested on getting the analytics bit working but I believe Ads should work too. Here is how I did it:
Cloned/downloaded the current CN1Flurry project from GitHub here https://github.com/chen-fishbein/flurry-codenameone. This allowed me to access the source files and use them for reference.
Importing the project as is into my Netbeans was bringing some 'resolve project' issues so I just went ahead and created a new project with similar name and package/class structure as CN1Flurry then copied classes from old project into the new one.
Open the FlurryNative class and delete the onPageView(), setLogEvents() and setCrashReportingEnabled() as these aren't supported by current Flurry Android SDK. Once done, right-click on the FlurryNative class and choose 'Generate Native Access'. This will allow you to create native implementations for Android, iOS, Windows etc in the 'native' folder of the project.
Chen's project uses version 5.3.0 of Flurry SDKs but the recommended SDK version is version 12.1.0. Download the latest aar files from your Flurry portal under the 'Admin' section and copy them to the 'android' folder. For me these were flurryAds_12.1.0.aar and flurryAnalytics_12.1.0.aar
Switch to the Files view of your Netbeans project and open the FlurryNativeImpl class. You can copy most of the implementations from Chen's project the only thing you need to change is the initFlurry() method to - new FlurryAgent.Builder().build(AndroidNativeUtil.getActivity(), apiKey); Flurry is initialized differently in the new SDK - https://developer.yahoo.com/flurry/docs/integrateflurry/android/
That's it. Switch back to the 'Projects' view then clean and build your CN1Flurry project to generate the .cn1lib file which you can then add to your UI project in the 'libs' folder. Remember to refresh cn1Libs files.
Finally, add the following build hints to your UI project:
android.min_sdk_version=16
android.multidex=true
android.xapplication=\<activity android:name="com.flurry.android.FlurryFullscreenTakeoverActivity" android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"> \</activity>
Chen suggests a whole lot of other build hints to add but I didn't find them useful for my case.
Still learning the ropes on how GitHub works; will make a pull request once I get comfortable. Meanwhile, you can get the entire project here - https://drive.google.com/open?id=1GGygaVelmMhMUX9Deik9W72hXkw_detG

Android Studio: Getting JDocTest to work

Currently my team is working on some more complex code which our app will use and although we have UnitTests running we would really like to be able to use JDocTest so that we can create tests while we write some of our smaller methods.
I have successfully followed the instructions from JDocTest github read me and compiled it into my project. However I'm having trouble running the particular .java class files. I'm trying to be able to run MatrixCreator.
Here is what my directory looks like
Here is my attempt to set up MatrixCreator under application
I get the error
Error:Gradle: A problem occurred configuring root project 'AvocadoCoreProject'.
Could not resolve all files for configuration ':classpath'.
Could not find com.android.tools.build:gradle:3.0.0.
Searched in the following locations:
https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom
https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.jar
Required by:
project :

Why is Visual Studio trying to use the wrong JDK version?

I am trying to build WeatherApp, which comes from this tutorial, but I am seeing this error:
The specified task executable location "C:\Program Files (x86)\Java\jdk1.7.0_55\bin\javac.exe" is invalid.
and this warning (not sure if they are related):
Found conflicts between different versions of the same dependent assembly. In Visual Studio, double-click this warning (or select it and press Enter) to fix the conflicts; otherwise, add the following binding redirects to the "runtime" node in the application configuration file: <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"><dependentAssembly><assemblyIdentity name="System.Runtime" culture="neutral" publicKeyToken="b03f5f7f11d50a3a" /><bindingRedirect oldVersion="0.0.0.0-4.1.0.0" newVersion="4.1.0.0" /></dependentAssembly></assemblyBinding>
I can doube-click the warning to make it go away, but the error remains. I am not sure why the project is trying to use that version of the jdk, as I have changed my xamarin optioins to point at Program Files instead:
Why is Visual Studio trying to use that versioin of the JDK?
Sometimes there's a sdk.caches file that will hold an old reference. Please try to delete both your obj/bin folders and see if that resolves the issue. If it doesn't, turn up your Build Output verbosity and attach a Build Output Log to your post:
https://forums.xamarin.com/discussion/27515/how-to-obtain-diagnostic-build-logs (XS)
http://blogs.msdn.com/b/msbuild/archive/2005/09/29/475157.aspx (VS)

"Unsupported flags DT_FLAGS_1=0x9" error on android gomobile

What I got going on in the project is a Cordova project that uses gradle to build. I created an android plugin that calls the Go script in the form of an .aar. All works with the simple hello world.go .aar. So I know that everything works. But adding in the selphyprint.aar it crashes with "Unsupported flags DT_FLAGS_1=0x9" error in adb logcat.
It's up at https://github.com/pbdesign/selphy. The full project is at https://github.com/pbdesign/printproject with an installable apk in the android folder of the com.photobooth project directory.
If you have any ideas, I found some similar error messages that are connected to android linker but don't know if they are related. Also any ideas on how to debug such an error would be appreciated.
This is not an actual full answer, but as a hint, DT_FLAGS_1 is a Binutils custom dynamic section entry (see the ELF standard).
These are produce by Binutils ld during link.
The 0x8 bit in particular is defined as:
#define DF_1_NODELETE 0x00000008
inside include/elf/common.h in Binutils 2.29.1.
I would then try to determine from Binutils source / docs what DF_1_NODELETE does to understand what is happening.
That flag is also mentioned at: glibc : Test if lib as DF_1_NODELETE flag or if lib has unique symbol

Categories