Codename One Facebook/Android - codenameone

Android build fails when I include the build hint "facebook.appId". iOS build works fine. Excerpt from the Android build log (I hope this is the relevant bit):
Merged dex A (41 defs/6.4KiB) with dex B (43 defs/53.5KiB). Result is
84 defs/71.7KiB. Took 0.2s Dex: Error converting bytecode to dex:
Cause: com.android.dex.DexException: Multiple dex files define
Lbolts/AggregateException;
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Lbolts/AggregateException;
at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:502)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
:transformClassesWithDexForRelease FAILED :transformClassesWithDexForRelease (Thread[Daemon worker,5,main])
completed. Took 2 mins 55.612 secs.
FAILURE: Build failed with an exception.
Any suggestions, anyone?

There is a conflict with the bolt jar facebook is including it and parse4cn1 is also including it.
Try to remove it by building the parse4cn1 without the bolts-android-1.2.1.jar file that is under the parse4cn1/native/android/ directory

Do you have leadbolts enabled in your project?
It looks like a conflict between leadbolts and facebook. Also try building with android.gradle=false and see if that works around the issue.

Related

maven clover plugin java.lang.NoSuchMethodError:com_atlassian_clover.CloverVersionInfo.An_old_version_of_clover_is_on_your_compilation_classpath

have somebody faced this issue with open sourced clover plugin for maven?
I'm trying to follow this instruction, but once I'm trying to run
mvn clean clover:setup test clover:aggregate clover:clover
I'm getting this error
[CLOVER] FATAL ERROR: Clover could not be initialised because of an unexpected error.
(class java.lang.NoSuchMethodError:com_atlassian_clover.CloverVersionInfo.
An_old_version_of_clover_is_on_your_compilation_classpath___Please_remove__
_Required_version_is___4_1_2()V)
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.459 sec <<< FAILURE!
clover-mavan-plugin version: 4.2.1 / 4.2.0, java 1.8
The message states that there are unexpected Clover version in the runtime. It looks like you have duplicate Clover on your classpath, or other Clover version was used to instrument sources and other one is added in the runtime to classpath.
Check your pom for Clover dependencies and clover-maven-plugin.
Make sure you don't mix Atlassian Clover and OpenClover, although one being fork of the other one, you can't simply mix them.
Another explanation is that you duplicated Clover dependency (in different versions) made somehow to your project, but the solution is basically the same.

Sencha CMD, upgrading from 6.0 to 6.1 IndexOutOfBoundsException

I'm trying to sencha app build with Sencha CMD 6.1.1.76 but I'm getting:
BUILD FAILED
[ERR] java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
[ERR] at com.sencha.command.BasePluginCommands$BasePluginCommand.doExecute(BasePluginCommands.java:97
[ERR] )
and not much else : /
this project was previously built using 6.0.0.92
but I don't see that specific one on sencha's cdn http://cdn.sencha.com/cmd/6.0.2.14/release-notes.html
I don't think I'm the only one with this issue: https://www.sencha.com/forum/showthread.php?309457-IndexOutOfBoundsException-when-running-sencha-app-build-testing&p=1131708#post1131708
Has anyone been able to overcome this issue ?
running sencha app upgrade is of no help, ExtJs 5.0 is using in this project.
Also I get a different exception but the same task originates it (slice-images within slice-impl.xml)
[ERR] BUILD FAILED
[ERR] com.sencha.exceptions.BasicException: Java heap space
[ERR] at com.sench
[ERR] a.cli.Command.dispatch(Command.java:43)
[ERR]
[ERR] Total time: 30 seconds
[ERR] The following error occurred while executing this line:
/Users/code4jhon/thellookingglass-git/.sencha/app/build-impl.xml:335: The following error occurred while executing this line:
/Users/code4jhon/thellookingglass-git/.sencha/app/slice-impl.xml:370: The following error occurred while executing this line:
/Users/code4jhon/thellookingglass-git/.sencha/app/slice-impl.xml:371: The following error occurred while executing this line:
/Users/code4jhon/thellookingglass-git/.sencha/app/slice-impl.xml:240: com.sencha.exceptions.BasicException: Java heap space
I have tried increasing the heap size on some configuration files but no luck.
So this is the workaround I found in order to be able to:
a) generate the css file on the build process
b) run all the other tasks from the build process.
Ultimately I found that the line causing this issue was:
ext.dir=${workspace.dir}/ext
that was on
.sencha/workspace/sencha.cfg
After removing that line I was able to run sencha app build and generate the proper css file.
And the index and resources on the production folder looked good but I got some issues on the regular index ... wrong references etc so looks like I needed that configuration.
ext.dir=${workspace.dir}/ext
So to overcome this I just backed up my .css file and then set:
#comment out this line
#ext.dir=${workspace.dir}/ext
skip.slice=1
in .sencha/app/sencha.cfg
This is the only way I have found to:
1 build the project
2 update the .css with a different theme.
UPDATE
This is generating an 'extjs trial' water mark on the components so it is not useful ...
What I usually do in cases where I'm using an older version of the framework is install the corresponding Sencha Cmd version.
In this case the Sencha Cmd version 6.0.0.92 is probably a beta version as is seen in the release notes:
Release Notes for Sencha Cmd 6.0.0 Beta
Date: May 22, 2015
Version Number: 6.0.0.154
So this is probably going to be difficult.
Is it possible to run sencha app upgrade --noframework. I know it is a ExtJS 5 application, but this only updates the Sencha Cmd configuration files. You can merge your changes easily afterwards and with some luck it'll work with Sencha Cmd 6.1.x.
If this doesn't work, please run sencha -d app build. This will generate an enormous amount of information, but it might give some hints to the exact cause. You can use sencha -d app build >build.log to create a log file.
Good luck, Sencha Cmd problems can be difficult to debug.

R Missing Package error when uploading to shinyapps.io

My Shiny program works fine locally on my PC (Windows 8, RStudio 0.99.489) but not when I upload it to shinyapps.io . I've tried 2 ways of packaging the data for upload - saveRDS on each object and save.image on the entire environment. Either way, when I upload it to shiny.io I get:
Preparing to deploy application...DONE
Uploading bundle for application: 77966...DONE
Deploying bundle: 350891 for application: 77966 ...
Waiting for task: 132618597
building: Parsing manifest
building: Building image: 344796
building: Installing packages
################################ Begin Task Log ################################
[2016-01-16T22:19:45.818533554+0000] Installing R package: magrittr (1.5)
Error in library(stylo) : there is no package called �stylo�
Execution halted
################################# End Task Log #################################
Error: Unhandled Exception: Child Task 132618599 failed: Error building image: Build exited with non-zero status: 1
Execution halted
It seems that Shiny isn't aware of the Stylo package. I tried to install it in my code, but that didn't help.
1. Does Shiny have all R packages?
2. If not, is there a list of which packages are available?
Thanks very much.
Are you including the stylo package at the top of your server.R file via library("stylo")? If you are doing that and it's giving you the error, try using require("stylo") instead.
From the docs, the rsconnect package is supposed to automatically detect what packages are necessary for your app. Probably worth a read (if you haven't already) just to be sure you're following everything correctly in order for rsconnect to do its job.
I solved the problem by doing a clean build of my environment -- imported data tables and functions from RDS files only, and carefully avoided references to unnecessary packages. I recreated the one function I needed from Stylo locally, so that I could be certain I wouldn't require it.

Android build fails in codenameone build sever

My android build fails after build and this is the error log i get
Total time: 1 mins 16.631 secs
Stopped 0 compiler daemon(s).
Received result Failure[value=org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwareException: Execution failed for task ':dexRelease'.] from daemon DaemonInfo{pid=5907, address=[10331ba5-2501-41cc-aa13-52a0ba46bd51 port:41817, addresses:[/0:0:0:0:0:0:0:1%1, /127.0.0.1]], idle=false, context=DefaultDaemonContext[uid=2862cb6d-50e8-4321-a1fa-590435e89f0f,javaHome=/usr/java/jdk1.7.0_67,daemonRegistryDir=/home/ec2-user/.gradle/daemon,pid=5907,idleTimeout=120000,daemonOpts=-XX:MaxPermSize=512m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1500m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]} (build should be done).
This is probably related to this: https://www.codenameone.com/blog/video-new-defaults-barcode-qrcode-changes.html
You can workaround this by using android.gradle=false in the build hints. However, I'm guessing its related to some cn1lib or build hint you added. But it seems the build error log you provided is partial so I don't see any issue there.

m2eclipse - Mystery Build Failure on Package

I am using Eclipse 3.6 (Helios64) and m2eclipse 0.12.1.20110112-1712. I have a new project that only contains two classes that builds a jar. When I right click the project and select "Run As -> Maven package", I get the following error:
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # switch-provisioning-rest-client --- [INFO] Compiling 2 source files to C:\Devel\EclipseProjects\MyProject\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Failure executing javac, but could not parse the error:
javac: invalid flag: -s
...
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
When I set up a run configuration with the Goals "package -X", the project builds without error. If I run a configuration with the goal set to compile, it builds without error and I can then run "Maven package" successfully.
This is the only project I'm having issues with. All my other projects build sucessfully when doing a "Maven package".
There's nothing exceptional about the project pom.xml. It refers to the same parent pom as the other projects and contains its project specific dependencies.
Has anybody got any ideas what could be different about this project?
TIA!
This issue was answered on the m2eclipse mailing list:
http://dev.eclipse.org/mhonarc/lists/m2e-users/msg01818.html
Although my pom had 1.6 as the version, the project configuration hadn't been updated.
From: Benjamin Bentmann
This issue is not really specific to m2e but applies to mvn in general, as such the Maven user list might provide a better audience for help.
IIRC, the specific error means you trying to use a JDK 1.5 while you need JDK 1.6+ where the javac option in question was added. Assuming your project should actually compile against JDK 1.5, downgrading the maven-compiler-plugin version might also do, I would expect it started to use the -s option when the annotation processing support was added.

Resources