how to repair flutter after interrupted upgrade? - flutter-upgrade

I executed flutter update but I accidentally performed a ctrl-C during the operation and the update was interrupted. Since I had a message with a java problem, I ran flutter -doctor telling me that the JDK is missing. I downloaded jdk 14.0.2 installed, and declared the path in the .profile .
Now flutter -doctor asks me to run 'flutter doctor --android-licenses' but I get an error message:
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.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:73)
at com.android.sdklib.tool.sdkmanager.SdkManagerCli.main(SdkManagerCli.java:48)
Caused by: java.lang.ClassNotFoundException: javax.xml.bind.annotation.XmlSchema
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:602)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 5 more

I faced same issue. I had to kill terminal app because it was not showing any progress for long time.
After that when I started terminal again, I tried running command flutter doctor and it resumed completing upgrade (like downloading/installing files) and after that it showed status like installation version, status of XCode, Android Studio, Simulator/Emulator etc.
So, running flutter doctor worked for me.

Related

arangodb lock file issue

So I downloaded ArangoDB via homebrew yesterday. The documentation said to use the following to get the server started:
/usr/local/Cellar/arangodb/<VERSION>/sbin/arangod &
I ended up using the prompt shown on the terminal
/usr/local/opt/arangodb/sbin/arangod
Don't know if that necessarily makes a difference. Nonetheless, I got the server working.
Then I wanted to set up authentication. The docs did not say how to stop a server. Since I didn't know how to, I just closed the terminal window
Then I ran
/usr/local/opt/arangodb/sbin/arango-secure-installation
This then gave me an error
FATAL [...] database is locked by process ..: please stop it first and check that the lockfile 'usr/local/var/lib/arangodb3/LOCK' goes away. If you are sure no other arangod process is running, please remove the lockfile '/usr/local/var/lib/arangodb3/LOCK' and try again
How do I fix this? I had the webgui running but closing that didn't make a difference.
Another stack overflow question said to use the following commands:
brew services stop arangod
brew services start arangod
brew services restart arangod
None of those worked?
So, two questions:
a) how do I solve this problem
b) and, in the future, how do I properly terminate a server?
Thanks
You can use "brew services start/stop/restart arangod". It is no longer necessary to start arangod explicitly. If it has been started explicitly just do a "killall arangod" to stop it gracefully and start it using "brew services start".

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.

How to configure pgadmin4 (PostgreSQL)

When I finished installation postgresql-10.5 and ran pgadmin4 (that came installed with postgresql) I get a configuration error that says:
An error occurred initializing the application server:
Failed to launch application server, server thread existing
It then asks me to input a python path and an application path.
Can anybody help me and and advise what to do to run pgadmin4. I tried find problem solution, but nothing helped me(

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.

Error while starting a GAE/GWT project: Unable to restore the previous TimeZone

When I try to run a GWT App Engine project using the Eclipse plugin, I get the following error:
Initializing App Engine server
[ERROR] Unable to start App Engine server
java.lang.RuntimeException: Unable to restore the previous TimeZone
at com.google.appengine.tools.development.DevAppServerImpl.restoreLocalTimeZone(DevAppServerImpl.java:228)
at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:164)
at com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:97)
at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1068)
at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:811)
at com.google.gwt.dev.DevMode.main(DevMode.java:311)
Caused by: java.lang.NoSuchFieldException: defaultZoneTL
at java.lang.Class.getDeclaredField(Class.java:1899)
at com.google.appengine.tools.development.DevAppServerImpl.restoreLocalTimeZone(DevAppServerImpl.java:222)
... 6 more
[ERROR] shell failed in doStartupServer method
Unable to start embedded HTTP server
com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
at com.google.appengine.tools.development.gwt.AppEngineLauncher.start(AppEngineLauncher.java:102)
at com.google.gwt.dev.DevMode.doStartUpServer(DevMode.java:509)
at com.google.gwt.dev.DevModeBase.startUp(DevModeBase.java:1068)
at com.google.gwt.dev.DevModeBase.run(DevModeBase.java:811)
at com.google.gwt.dev.DevMode.main(DevMode.java:311)
Chris Cashwell provided the correct answer. But for people like myself who are relatively new to Eclipse, here are more explicit instructions (which I came across here):
Right-click project directory in Project Explorer window
Select Run As > Run Configurations...
Go to Arguments tab
In VM Arguments textbox, add one of the following parameters mentioned by Chris:
-Dappengine.user.timezone.impl=UTC (this worked in my case)
-Dappengine.user.timezone=UTC
Click Apply then Run
In my case, this was done specifically in the context of a PlayN project I am working on, so I was right-clicking the HTML folder. In the end, my VM arguments looked something like this:
-Xmx512m -javaagent:/long/path/to/appengine-agent.jar -Dappengine.user.timezone.impl=UTC
See this bug report. For me, it was fixed by downgrading the JDK from 1.7.0_03 -> 1.7.0_02. Other things that have been purported to work are adding -Dappengine.user.timezone=UTC (or in some cases -Dappengine.user.timezone.impl=UTC) to the JVM flags.
i got this error, and found port already in use in the console.
I closed eclipse and killed javaw.exe. Then everything worked fine.

Resources