Android Studio Not Showing Error - android

My android studio v1.0 does not give update if there is error on my code or is a particular syntax is wrong. is an illustration of the issue.
int j = "" suppose to be an error and the line ought to be mark red. But if does not. Only get notified that there is error on code when compiling the code.

Related

Android studio java.lang.NoClassDefFoundError: org/HdrHistogram/EncodableHistogram

I get this error whenever I try anything in the mainActivity.kt file
even in completely new projects (Kotlin)
just hitting enter to jump line brings this error
how do I fix this please ?

How to get the full information of runtime error instead of <Timeout exceeded getting exception details>?

So I'm trying out xamarin in VS2017, but found this undhandled error:
Unhandled Exception:
Java.Lang.SecurityException: <Timeout exceeded getting exception details>
This is very clueless. How can I get the full information of the runtime error like in Android Studio?
I had the same problem while calling some native API,
solved it by
Put a try catch around the block of got which is throwing the error.
Put a breakpoint in the catch block, you can get actual details of the exception.
After getting assistance from Microsoft, I finally found the solution.
TL;DR
Use VS Android device log and filter with "mono-rt" or "Error"
Complete Answer:
There are 2 solution:
1. Using Android Studio logcat:
Open the Android Studio logcat (View > Tool Windows > Logcat). From the logcat window, choose the device, choose the Xamarin.Android deployed application, and choose logcat for Error
Android logcat will display the runtime error:
2. Using Visual Studio Android Device Log:
Open the Visual Studio Android Device Log(Tools > Android > Device Log).
Here is the tricky bit: Unlike Android Studio, VS list all of the device log, not limited to the Xamarin.Android app deployed. So somehow we have to use the filter to get the relevant information. The problem is, what filter should we use? I used my application name and the error didn't show up. It turns out that when the error happen, the log doesn't contain any of the application name. Instead it has "mono-rt" tag with "Error" type.
So there you have it. Filter it with "mono-rt" tag or "Error" type and you will find the error information

Android kotlin doesn't show dagger error log

I will get straight to the problem. Android studio isn't showing me, the Dagger 2 ( version 2.14.1 ) errors in the logcat. By this I mean. In the below image you can see the error "Error:(29, 10) Unresolved reference: DaggerAppComponent". Which for me is very unclear. Is there any way to configure the project in such a way to see more information? ( I am hoping to see ( in the logcat ) something like in the second picture )
First Image
Second Image
Here is a link to the project: https://drive.google.com/file/d/1bZ8niQK01xP-khD_20o4h7QI5XXrMYvx/view?usp=sharing
You have to check in gradle console in the bottom/right of the window, not in logcat

AspectJ plugin in Android Studio error messages not clickable

I am using this plugin for AspectJ support in my android project.
When I am making syntax errors , such as missing semicolon , I expect to see clickable error in messages log after I try to build the project.
Something like this :
...\designlibdemo\MainActivity.java
Error:(89, 63) error: ';' expected
When I click on the error line , it takes me to the class and the line where the error is occurred.
But now when I am using aspectJ plugin , I only see the error description , which is actually not clickable , and I cannot follow the error to the code.
Looks like this :
Error:Execution failed for task ':app:compileProductionDebugAspectj'.
Syntax error, insert ";" to complete BlockStatements
Does anyone know how to make it clickable , so it will take me to the error line ?
According to author the issue is now fixed :)
https://github.com/uPhyca/gradle-android-aspectj-plugin/issues/26

An error occured when attemping to generate client libraries

I've kept the updates ON in Eclipse, so may be Google app engine is causing the problem,Still didn't got the solution.
The Error log is here
java.lang.reflect.InvocationTargetException
at com.google.gdt.eclipse.appengine.swarm.wizards.GenerateSwarmApiAction$1.run(GenerateSwarmApiAction.java:82)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
Caused by: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 17090
at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:180)
at com.google.gson.Gson.fromJson(Gson.java:755)
at com.google.gson.Gson.fromJson(Gson.java:721)
at com.google.gson.Gson.fromJson(Gson.java:670)
at com.google.gson.Gson.fromJson(Gson.java:642)
at com.google.gdt.eclipse.managedapis.ManagedApiUtils.findAndReadDependencyFile(ManagedApiUtils.java:185)
at com.google.gdt.eclipse.managedapis.ManagedApiUtils.findAndReadDependencyFile(ManagedApiUtils.java:179)
at com.google.gdt.eclipse.managedapis.ManagedApiUtils.findAndReadDependencyFile(ManagedApiUtils.java:179)
at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmServiceCreator.copyToConnectedAndroidProject(SwarmServiceCreator.java:148)
at com.google.gdt.eclipse.appengine.swarm.wizards.helpers.SwarmServiceCreator.create(SwarmServiceCreator.java:453)
at com.google.gdt.eclipse.appengine.swarm.wizards.GenerateSwarmApiAction$1.run(GenerateSwarmApiAction.java:80)
... 1 more
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 17090
at com.google.gson.stream.JsonReader.expect(JsonReader.java:339)
at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:322)
The Problem is:-
I've created a project with the app engine and was running perfectly but to due to some error in build path i've deleted the project and the app engine from the workspace and imported it again.
Now whenever i generate client libraries from app engine then this error is coming.
I've tried cleaning project,closing and reopening eclipse then also its not working
please help me.
Edit
I've copied the same code in new project and its working fine but not in old project
Did you clean the project ?
First for all these issues have to clean project.
If it remains the error then check with Android Library you are working with.
Be assured of using latest Android Library that is 4.3 to 4.4.2.
If still remains the issue there might be problem with Google Api package reference.
Then add Google API reference 4.3 by going to properties of the project
Expected BEGIN_OBJECT but was STRING at line 1 column 17090.
this line shows that there is an issue in your json input string that you are giving as a input to the gson. if you resolve this, your problem might be solved.
Please Turn off Google AppEngine Updates before proceeding the steps.
Steps to turn off Updates of eclipse is:-
1) Window->preferences->Install/Update->Automatic Updates(Uncheck it)
Steps followed while creating the new project which resolved me the error is:-
1) Create New Android project.
2) Right Click on project then Google->Generate App Engine Backend which creates a new project named Project-AppEngine
3) Copied all the Entities and the endpoints in AppEngine project.
4) Now I tried to generate the Cloud Endpoint Library and it worked.
This answer is just to escape the problem if you are facing it.

Categories

Resources