Graphic is disposed Exception - android

I am getting the following exception stack trace when I open the ADT/Eclipse:
org.eclipse.swt.SWTException: Graphic is disposed...(remaining trace here is quite long)
The corresponding messages in the Event details dialog are as follows:
Exception while dispatching event org.osgi.service.event.Event
[topic=org/eclipse/e4/ui/model/ui/UIElement/toBeRendered/SET] to
handler
org.eclipse.e4.ui.services.internal.events.UIEventHandler#7f6e8e26
Error while loading editor
Unhandled event loop exception
Just prior to these errors I was copying XML files form one project to another.
I have subsequently deleted every XML that had been copied but still getting the errors.
Am new to the ADT have read around a bit have not found any solutions.
Also, this is the first message to appear when opening ADT:
System property http.nonProxyHosts has been set to
local|.local|169.254/16|.169.254/16 by an external source. This
value will be overwritten using the values from the preferences

Performing a clean and refresh on eclipse (in terminal CD to Eclipse.app\Contents\MacOS then ./eclipse -clean -refresh. ) removed the error temporarily . Once I updated to eclipse Juno the error disappeared altogether. Hope this helps anyone with similar issue.

Related

Unhandled event loop exception while I try to add a second Activity

I'm new to Android app development. I'm using Eclipse v4.6 (Neon) for this. When I try to add a second Activity to my project, an error occurs which says:
Unhandled event LoopException occurred.
Other details of the error are:
The details of the log file are:
Unhandled event loop exception
java.lang.StackOverflowError
The details of the log file are:
Plug In: org.eclipse.ui
Severity: error
Exception Stack Trace:
java.lang.StackOverflowError
at org.eclipse.core.internal.filesystem.local.LocalFileNatives.internalGetFileInfoW(Native Method)
at org.eclipse.core.internal.filesystem.local.LocalFileNatives.fetchFileInfo(LocalFileNatives.java:113)
at org.eclipse.core.internal.filesystem.local.LocalFileHandler.fetchFileInfo(LocalFileHandler.java:27)
at org.eclipse.core.internal.filesystem.local.LocalFileNativesManager.fetchFileInfo(LocalFileNativesManager.java:62)
at org.eclipse.core.internal.filesystem.local.LocalFile.fetchInfo(LocalFile.java:159)
at org.eclipse.core.filesystem.provider.FileStore.fetchInfo(FileStore.java:258)
at org.eclipse.core.internal.localstore.FileSystemResourceManager.fastIsSynchronized(FileSystemResourceManager.java:463)
at org.eclipse.core.internal.localstore.FileSystemResourceManager.isSynchronized(FileSystemResourceManager.java:735)
at org.eclipse.core.internal.resources.Resource.isSynchronized(Resource.java:1446)
at org.eclipse.core.internal.resources.File.getContentDescription(File.java:257)
How do I fix these errors?
In Android Studio there is a AndroidManifest.xml file which all activities are registered in. Maybe you should register your activities in Eclipse as well.
Try to add an activity with your IDE tools, not by yourself. In Android Studio you can easily right click on the project folder → New → Android activity.
In Eclipse you can click on the new project button and choose Android Activity (below Android Application Project).

How to fix error in android sdk - java.lang.StackOverflowError

Soon as I open eclipse, I get following error on popup:
Unknown exception in parseSdkContent.
java.lang.StackOverflowError
If I close this popup I get another popup saying the following:
A stack overflow error has occurred.
you are recommended to exit the workbench.
subsequent errors may happen and may terminate the workbench without warning.
see the .log file for more details.
So than I checked my .log file and it had a following error:
!ENTRY com.android.ide.eclipse.adt 4 0 2015-05-13 22:56:25.701
!MESSAGE Unknown exception in parseSdkContent.
!STACK 0
java.lang.StackOverflowError
at com.android.ide.eclipse.adt.internal.sdk.ProjectState.buildFullLibraryDependencies(ProjectState.java:682)
at com.android.ide.eclipse.adt.internal.sdk.ProjectState.buildFullLibraryDependencies(ProjectState.java:691)
at com.android.ide.eclipse.adt.internal.sdk.ProjectState.buildFullLibraryDependencies(ProjectState.java:691)
at com.android.ide.eclipse.adt.internal.sdk.ProjectState.buildFullLibraryDependencies(ProjectState.java:691)
at com.android.ide.eclipse.adt.internal.sdk.ProjectState.buildFullLibraryDependencies(ProjectState.java:691)
I already tried the following 5 things:
1) Re-install eclipse and reset my phone
2) Update android SDK Manager
3) Update ADT
4) Delete my .android folder
5) Use 'task manager' to end 'adb'. than I restart my adb using cmd.
But nothing is seem to be working. any ideas?
It is important to trace down memory leaks. We use canaryleaks in order to monitor objects that might cause problems in the future.
Take a look at this post, this might help you.
https://corner.squareup.com/2015/05/leak-canary.html

Issue with projectfolder called (AndroidProjects)?

I have a wired issue. If i set up a folder called AndroidProjects and put my project in there... Android-Studio fails with gradle.
one error is:
IllegalStateException:
PsiFile not parsed for file D:/AndroidProjects/MyApplication/settings.gradle.
Wait until onPsiFileAvailable() is called.
sometimes it says that gradle has a fatal error....
if i set up my projectlocation to e.g. andropro everyting is working fine.
My thoughts:
may problems with 2 big letters in projectfoldername
may foldername is to long
may android or project are registered words in android-studio
Is there a knowen issue using foldernames like i did above?
couldn't find anything on the net.

Android: Gradle Error in Android Studio

I recently added some .gifs to my /drawable so that I can use them with buttons. This worked fine (no errors). Now, when I go to rebuild/run my application, I get the following error:
Error: Gradle: Execution failed for task ':MyProject:mergeDebugResources'. > Index: 0
I'm not sure how to fix this (and there appears to be no other similar issues that I could find online.
Edit: Now it's the same error, but it also says (at the end of the first error)
Running /Applications/Android Studio.app/sdk/build-tools/android-4.2.2/aapt failed. See output
Okay, I fixed the issue. It was quite weird.
A) I had some capital letters in my res/drawables folder. Not too weird -- I can see how that would remove the first error.
B) Then, however, a lot of values in my main activity file became undefined. I had to manually import 'com.myapp.R'. Now that was weird.
Fortunately, everything is now working.
I hope that if anyone gets the same errors as me, that this response can help them.

Error while opening trace file in Traceview in Android

I am using ADT 20.0.3. I am opening my trace file using following command:
C:>traceview "C:/Users/androdev/mytracefile.trace"
But I am getting following error:
Failed to read the trace filejava.io.IOException: Key section does not have an *end marker
at com.android.traceview.DmTraceReader.parseKeys(DmTraceReader.java:420)
at com.android.traceview.DmTraceReader.generateTrees(DmTraceReader.java:91)
at com.android.traceview.DmTraceReader.<init>(DmTraceReader.java:87)
at com.android.traceview.MainWindow.main(MainWindow.java:286)
mytracefile.trace is generated by using Debug.startMethodTracing("mytracefile") and Debug.stopMethodTracing() methods in my code.
Anyone know how to resolve this?
That simply means the tracefile is empty. Most probably Debug.stopMethodTracing() is not being called, and thus the tracefile data ends up being empty.

Categories

Resources