Flutter not pointing me to the line throwing an error - android-studio

Before in my android studio and flutter project, if I have an error showing like this image below
When I click on the file path throwing the error, it takes me to the exact line throwing the error in the file, but since when I reinstall android studio, when I click the file path throwing the error, it always takes me to line 1 of the file.
Is there a way I can resolve this issue?

Related

I am getting this pop up when I make any new project in android studio

Unable to load class 'org.gradle.initialization.layout.BuildLayoutFactory'
This is an unexpected error. Please file a bug containing the idea.log file.

Referencing a file (forward slash path) from Windows is giving error while the same works for Linux

I have a gradle file which references another gradle file using:
// settings.gradle
// references `playground-include-settings.gradle` file
apply from: "../playground-common/playground-include-settings.gradle"
When opening the code in Android Studio, the above Gradle file is executed and with the same exact setup, it works for Linux but DO NOT work when done for Windows.
I tried with backward slash \\, double forward slash // in Windows but it did not work either.
Error (ONLY on WINDOWS): (Line 19 is above of apply from ...)
Exception is:
org.gradle.api.GradleScriptException: A problem occurred evaluating script. at settings_b5vpkybm1b8f1fi4z6dnydgh9.run(D:\path\to\code\settings.gradle:19)
Caused by: java.lang.IllegalStateException:
What is the cause of the error and how to make referencing another file compatible in Windows?
Turns out the error was not related to file path, but rather I missed the error stack trace that said to use "JDK 11" instead of "JDK 8"
I had to go to Project Structure dialog in Android Studio and then under SDK Location, set the JDK to 11 version.
And then Gradle sync. It worked.

Android Studio giving me an IOException when updating

I am trying to update my Android Studio but it keeps giving me an error. It pops up with this screen
If I click proceed, this screen pops up
checking out the idea_updater.log file gives me this error
08/12 12:40:17 ERROR Patch.apply - apply failed
java.io.IOException: Cannot delete: C:\Program Files\Android\Android Studio\bin\runnerw.exe
at com.intellij.updater.Utils.tryDelete(Utils.java:109)
at com.intellij.updater.Utils.access$000(Utils.java:12)
at com.intellij.updater.Utils$1.visitFile(Utils.java:72)
at com.intellij.updater.Utils$1.visitFile(Utils.java:69)
at java.nio.file.Files.walkFileTree(Files.java:2670)
at java.nio.file.Files.walkFileTree(Files.java:2742)
at com.intellij.updater.Utils.delete(Utils.java:69)
at com.intellij.updater.BaseUpdateAction.replaceUpdated(BaseUpdateAction.java:115)
at com.intellij.updater.UpdateAction.doApply(UpdateAction.java:66)
at com.intellij.updater.PatchAction.apply(PatchAction.java:199)
at com.intellij.updater.Patch.lambda$apply$3(Patch.java:399)
at com.intellij.updater.Patch.forEach(Patch.java:471)
at com.intellij.updater.Patch.apply(Patch.java:390)
at com.intellij.updater.PatchFileCreator.apply(PatchFileCreator.java:64)
at com.intellij.updater.Runner.install(Runner.java:366)
at com.intellij.updater.Runner.main(Runner.java:138)
I have no idea what is going on, or what to do. Any help is appreciated.
Apparently, this can happen if your computer is not fully up to date or is trying to install updates in the background. Updated my computer and it went through perfectly fine.

ERROR: Failed to parse properties from config.ini; AVD ERROR

I've problem while loading emulator in android studio 3.1.
When I click run emulator it says
Error: Failed to parse properties from C:\Users\John\.android\avd\3.7_WVGA_Nexus_One_API_22.avd\config.ini
When I went to the avd\3.7_WVGA_Nexus_One_API_22.avd there was no config.ini file in it but in .android\avd folder there was a 3.7_WVGA_Nexus_One_API_22.ini file.
I thought this was the file the avd was searching for, so renamed it to config.ini and pasted in avd\3.7_WVGA_Nexus_One_API_22.avd folder and then I restarted android studio. But once again it was showing the same error!
How can I fix this error?
I had same problem. I solved it using this solution : Android Virtual Device Creation failed to parse properties
"step-1:go to window-> avd manager step-2:select installed avd and click edit step-3:click EditAVD Button in bottom
Then your problem is solved."

Android Studio: Gradle error

I have created a project in Android Studio but when I'm about to run it, this message appears:
'Unexpected exception while reading 9-patch file: Unable to parse
file:
F:/Lazarillo/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.2.0/res/drawable-hdpi/abc_btn_switch_to_on_mtrl_00012.9.png
'
I have tried to create new gradles but it's just impossible, it doesn't run anyway.
There are no errors in the code, everything looks flawless, what should I do?

Resources