Android build fails in codenameone build sever - codenameone

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.

Related

Ionic build failed without specific error

After cloning my Ionic React project to my server, I ran npm install and all dependencies were installed as expected.
But when I tried to build my app running sudo ionic build --verbose, it tooks much more time than usual and ended like this :
eslint:lint-result-cache Persisting cached results: /var/www/html/ms-users-front/node_modules/.cache/.eslintcache +0ms
eslint:cli-engine Linting complete in: 4827ms +48ms
//It stay here for at least 10min before to failed while it tooks 1min in my local machine.
The build failed because the process exited too early. This probably means the system ran out of memory or someone called `kill -9` on the process.
[ERROR] An error occurred while running subprocess react-scripts.
react-scripts build exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
ionic:utils-process onBeforeExit handler: 'process.exit' received +0ms
ionic:utils-process onBeforeExit handler: running 1 functions +1ms
ionic:utils-process processExit: exiting (exit code: 1) +44ms
My server is an ec2 instance with httpd installed and everything was working great before I tried to build a new version yesterday.
With exactly the same process, the app is building perfectly on my local machine...
I tried npm update, delete eslint cache, and build but without success.
I tried to downgrade Typescript to 4.1 because I had a warning saying that Typescript should be >4.5 and it was 4.7. But after some tests on local, it looks like this has no incidence on the build process.
I'm totally stuck and I absolutly don't know what to try.

React Native android build FAILD :app:mergeReleaseResources

The App is working fine, in fact I have built 2 release APKs. This time I modified the code and came to do ./gradlew assembleRelease and I got the following error:
Error
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:mergeReleaseResources'.
Expectation
To generate a healthy APK ready to publish.
Extra Info
I have done the signing and the .keystore in the right place ../android/app
Updated ../android/gradle.properties as instructed
Here is the complete stacktrace:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:mergeReleaseResources'.Close stacktrace
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:110)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:77)
at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59)
at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ResolveBuildCacheKeyExecuter.execute(ResolveBuildCacheKeyExecuter.java:79)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101)
at org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44)
at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91)
at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:59)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.run(EventFiringTaskExecuter.java:51)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300)
at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:292)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:174)
at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:90)
at org.gradle.internal.operations.DelegatingBuildOperationExecutor.run(DelegatingBuildOperationExecutor.java:31)
at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:46)
at org.gradle.execution.taskgraph.LocalTaskInfoExecutor.execute(LocalTaskInfoExecutor.java:42)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareWorkItemExecutor.execute(DefaultTaskExecutionGraph.java:277)
at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareWorkItemExecutor.execute(DefaultTaskExecutionGraph.java:262)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:135)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:130)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.execute(DefaultTaskPlanExecutor.java:200)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.executeWithWork(DefaultTaskPlanExecutor.java:191)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$ExecutorWorker.run(DefaultTaskPlanExecutor.java:130)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
Screenshot from the Scan1
Screenshot from the Scan2
Screenshot from the Scan3
from android Studio - I believe it is related to the issue
Screenshot from the Scan4
I believe this could be a duplicate of this question:
Error Execution failed for task ':app:mergeReleaseResources' building APK
The problem occured becaused when I tried to build once, it has
created drawables dirs on android/app/src/main/res/. Then when I tried
on second time, it has shown me this error Execution failed for task
':app:mergeReleaseResources' building APK
I just deleted the drawable-* dirs and it worked.
To remove the directory drawable--*:
rm -rf android/app/src/main/res/drawable-*
There is no drawable folder inside res, still the error occurs.
While running the emulator the build is successful and emulator works fine but I couldn't take release apk because of build failure.

Why am I getting an Android Build Error due to issues with Manifest Merger?

IDE: IDEA
OS: Mac High Sierra
Issue: Sending android build, works fine on simulator.
When I attempt to send an android build for my project that runs perfectly in the simulator, I receive this exception in the log (I am using a basic storage plan so size should not be the issue), would love any insight as I am not very experienced with these kinds of errors:
Exception
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':processReleaseManifest'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:103)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:73)
at org.gradle.api.internal.tasks.execution.OutputDirectoryCreatingTaskExecuter.execute(OutputDirectoryCreatingTaskExecuter.java:51)
at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:59)
at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:59)
at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:101)
at org.gradle.api.internal.tasks.execution.FinalizeInputFilePropertiesTaskExecuter.execute(FinalizeInputFilePropertiesTaskExecuter.java:44)
at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:91)
at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:62)
at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:59)
at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:256)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:249)
at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:238)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:123)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:79)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:104)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:98)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:663)
at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:597)
at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:98)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
Caused by: java.lang.RuntimeException: Manifest merger failed with multiple errors, see logs
at com.android.builder.core.AndroidBuilder.mergeManifestsForApplication(AndroidBuilder.java:509)
at com.android.build.gradle.tasks.MergeManifests.doFullTaskAction(MergeManifests.java:150)
at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.java:109)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
at org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute(IncrementalTaskAction.java:50)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:39)
at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:26)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:124)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:199)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:110)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:113)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:95)
... 30 more
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
See https://docs.gradle.org/4.6/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 12s
11 actionable tasks: 11 executed
Process return code is 1

Which SDK and Build Tools versions do I use to compile sources generated from the CN1 build server?

I'm trying to debug code as it runs on my Android test device. I sent a build to the CN1 server and downloaded the resulting sources.zip, which I then used to create a project in Android Developer Studio.
When I compile using
Compile SDK Version: API21 or API 22 with
Build Tools Version: 21.1.2 or 22.0.1, respectively
I get the following compile errors:
C:\home\dev\ProxyServerDebug\build\intermediates\res\merged\debug\values-v23\values-v23.xml
Error:(3) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
Error:(18) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
Error:Execution failed for task ':processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\opt\android-sdk\build-tools\22.0.1\aapt.exe'' finished with non-zero exit value 1
When I compile using
Compile SDK Version: API 23
Build Tools Version: 23.0.2
I get the following compile errors:
C:\home\dev\ProxyServerDebug\src\main\java\com\codename1\impl\android\AndroidImplementation.java
Error:(4563, 21) error: cannot find symbol method setLatestEventInfo(Activity,String,String,PendingIntent)
C:\home\dev\ProxyServerDebug\src\main\java\com\codename1\impl\android\PushNotificationService.java
Error:(110, 18) error: cannot find symbol method setLatestEventInfo(PushNotificationService,String,String,PendingIntent)
Is it just a matter of setting the correct SDK and Build Tools versions? or am I missing something else? BTW, sources were generated this morning, so I should be on the latest CN1 3.3 release.
If I recall correctly it should be 22.0.1 the reason build fails by default is that you need to configure an external gradle directory as explained in How to build the native Android sources from Codename One's build server

BlackBerry 10 Cascades - Running app on the simulator

I am new to blackberry development and ran into this problem several times and cannot find a solution.
When I try to run an empty cascades project just with a simple HelloWorld label I get the following error
Deployment Failed: Info: Sending request: Install and Launch
Info: Action: Install and Launch
Info: Debug native: on
Info: File size: 190910
Info: Installing com.example.HelloWorld.testDev__HelloWorld7d1bfe91...
Info: Processing 190910 bytes
I'm using Momentics, VMware running BB10 Dev Alpha Sim and followed all the instructions here. http://developer.blackberry.com/cascades/documentation/getting_started/setting_up.html
I made sure my build config is set to Simulator-Debug and not even the example projects are able to run on the simulator.
Edit: I am not sure if this bit of info helps but when I try to run the application, the Progress hangs at 91% before the error dialog appears.
May be you are not setting the development Mode (like current Development Mode Simulator or Device) . I also getting the issue that Project Compile but not able to run on virtual Machine , today I sort the issue . check out the link http://supportforums.blackberry.com/t5/Native-Development/BB10-Native-Cascades-SDK-not-connecting-to-Alpha-BB10-simulator/td-p/1719865/page/5

Resources