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

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

Related

Nativescript, Unable to make changes on device. error is: cannot read property 'startsWith' of null

I ran tns run android in my Windows 10 Command prompt with administrator privelleges.
Upon execution i get this error
C:\Users\Work\tns-station\Hello>tns run android
Skipping node_modules folder! Use the syncAllFiles option to sync files from this folder.
Searching for devices...
Copying template files...
Unable to apply changes on device: 192.168.28.102:5555. Error is: Cannot read property 'startsWith' of null.
Please what is the problem.
Note: "I ran this command in my apps directory".
Might be unrelated, but I had the same error message and it turned out that my HTTPS_PROXY environment variable was incorrect (incorrectly started with an '=' in my case).
Check that the value of the proxy variables are correct.
To help narrow down the issue, run with the "--log trace" and if you are able, check the value returned by getProxyUri with the getAgent method within \node_modules\nativescript\node_modules\make-fetch-happen\agent.js

Cannot run an android code on Processing

When I try to run an android code in Processing 2.2.1 Android mode I get the following message:
Error from inside the Android tools, check the console.
And then:
java.io.FileNotFoundException: C:\Users\USER\Documents\Processing\modes\AndroidMode\icons\icon-96.png (The system cannot locate the resource specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at processing.app.Base.copyFile(Base.java:2698)
at processing.mode.android.AndroidBuild.writeRes(AndroidBuild.java:807)
at processing.mode.android.AndroidBuild.createProject(AndroidBuild.java:169)
at processing.mode.android.AndroidBuild.build(AndroidBuild.java:91)
at processing.mode.android.AndroidMode.handleRunDevice(AndroidMode.java:227)
at processing.mode.android.AndroidEditor$16.run(AndroidEditor.java:513)
BUILD FAILED
C:\Users\USER\AppData\Local\Temp\android9132488509980035650sketch\build.xml:9: The entity name must immediately follow the '&' in the entity reference.
Total time: 0 seconds
What can I do to solve it? I am a total beginner so please try to be as specific and clear as possible.
Thanks!
Program wants this file "C:\Users\USER\Documents\Processing\modes\AndroidMode\icons\icon-96.png" and cannot find it.

Graphic is disposed Exception

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.

Running Android Lint has encountered a... Failed. java.lang.NullPointerException

I just added Google Play Service Library to my project and when I am making a modification in one of my project files I am keep getting an error dialog from eclipse:
'Running Android Lint' has encountered a problem. Failed.
So, I enabled Error Log (Window -> Show View -> Error Log) tab and I found a warning and an error line:
Error:
Failed: com.android.ide.eclipse.adt
java.lang.NullPointerException
at com.android.tools.lint.checks.ApiDetector$ApiVisitor.checkField(ApiDetector.java:1416)
at com.android.tools.lint.checks.ApiDetector$ApiVisitor.visitSelect(ApiDetector.java:1277)
at com.android.tools.lint.client.api.JavaVisitor$DispatchVisitor.visitSelect(JavaVisitor.java:904)
at com.android.tools.lint.client.api.JavaVisitor$DelegatingJavaVisitor.visitSelect(JavaVisitor.java:1147)
at lombok.ast.Select.accept(Select.java:91)
at lombok.ast.MethodInvocation.accept(MethodInvocation.java:121)
at lombok.ast.ExpressionStatement.accept(ExpressionStatement.java:63)
at lombok.ast.Block.accept(Block.java:106)
at lombok.ast.MethodDeclaration.accept(MethodDeclaration.java:240)
at lombok.ast.NormalTypeBody.accept(NormalTypeBody.java:57)
at lombok.ast.ClassDeclaration.accept(ClassDeclaration.java:239)
at lombok.ast.CompilationUnit.accept(CompilationUnit.java:83)
at com.android.tools.lint.client.api.JavaVisitor.visitFile(JavaVisitor.java:219)
at com.android.tools.lint.client.api.LintDriver.checkIndividualJavaFiles(LintDriver.java:1624)
at com.android.tools.lint.client.api.LintDriver.runFileDetectors(LintDriver.java:993)
at com.android.tools.lint.client.api.LintDriver.checkProject(LintDriver.java:869)
at com.android.tools.lint.client.api.LintDriver.analyze(LintDriver.java:442)
at com.android.tools.lint.client.api.LintDriver.analyze(LintDriver.java:363)
at com.android.ide.eclipse.adt.internal.lint.LintJob.run(LintJob.java:163)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
and a Warning:
Fatal Error: No API database found at null
An exception stack trace is not available.
My application is working, but it is annoying to close the dialog each time I make an edit and save.
This is a workaround (not exactly the solution). In Window > Preferences > Android > Lint Error Checking, uncheck "When saving files check for errors".
EDIT:
Please use the above steps only if you don't care about linting your code. These steps are for turning off Lint checking, not correcting the reported lint errors.
I would suggest for you to check on the warnings on your project. Resolving them one by one may get rid of the startup error.

Android Memory Analysis

I have to search for memory leaks in an Application at the moment and have a workflow problem. This ( http://android-developers.blogspot.com/2011/03/memory-analysis-for-android.html ) blog post states:
If you're running ADT (which includes a plug-in version of DDMS) and
have MAT installed in Eclipse as well, clicking the “dump HPROF”
button will automatically do the conversion (using hprof-conv) and
open the converted hprof file into Eclipse (which will be opened by
MAT).
But wen I press the button within eclipse and try to open the hprof file I get this error - so I still have to do the conversion:
Error opening heap dump 'com.baseapp.foo.hprof'. Check the error log
for further details. Error opening heap dump
'com.baseapp.foo.hprof'. Check the error log for further details.
Unknown HPROF Version (JAVA PROFILE 1.0.3) (java.io.IOException)
Unknown HPROF Version (JAVA PROFILE 1.0.3)
anyone knows what I am doing wrong here? I am using ADT 16
I had this issue on my setup also, it seems there is a certain series of steps that cause eclipse to default to saving to a file (instead of doing the conversion and opening it).
Anyway to fix it:
Preferences (The global Eclipse ones) -> Android -> DDMS -> HPROF Action -> set to "Open in Eclipse" (Mine was previously on "Save to Disk")
Convert hprof file take from Android OS into standard hprof format. For this you can use hprof-conv tool that is located at AndrodiSDK/tools/hprof-conv.
Like this
hprof-conv android.hprof mat.hpof
And then open mat.hprof in Memory Analyzer.
The error message indicates that there are additional details in the error log (Window > Show View > Error Log). Can you clear the log, then reproduce the problem, then see what if anything appears in the error log to help pinpoint the problem?

Categories

Resources