I installed android studio synced with gradle files so my design editor came but after I connected my phone the code ran in my phone at first but when I closed android studio and opened it again it showed me dependency error - could not download junit.
I have tried invalidate and also tried deleting files from project folder, the error goes for once but again comes back so please give me permanent solution for this error. The android studio is latest version and coding with java
Related
I know similar questions exist already. But my case seems different. I have these inline compiler error ONLY in the files that are Flavor specific; added in "...\src\myFlavor\...". And even the basic classes are not found, check the image attached in the end. When I run the app, it compiles and runs fine.
I have tried these steps already:
File > Invalidate Cache/Restart > Invalidate and Restart
Delete two files .gradle and .idea
Remove dependency which is showing error & Sync. Again add dependency & Sync.
I even did a fresh install of Android Studio on another laptop and pulled my code there. Nothing resolves this.
I have more than 5 flavors in my app.
I am using the following versions of gradle, kotlin and Android studio.
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.20"
api "org.jetbrains.kotlin:kotlin-stdlib:1.7.20"
Android Studio: Dolphin | 2021.3.1 Patch 1
This issue is old, I was living with it. So now I added this question here. Please help me with it. It makes development very hard on these files.
I reported the issue and Android team guided me.
I installed Android Studio Flamingo and the issue got resolved.
I didnt know there was a new version out there cz I used to "check for updates" and it said u have the latest version.
After upgrading to arctic fox, I faced this issue. Opened a project I worked previously with older version of android studio was fine, but after restart its files became full with gibberish values. I thought its a hardware failure issue. But this happening again today with other projects, so I want a solution.
After working, closing and reopening the project the files contents became corrupted/changed:
File contents changed on previous project, showing difference with git:
ArcticFoxPatch2, Projects are built with gradle 7.0.2.
Solutions tried:
I have tried potential solution of invalidating cache and restart, but the files stays same.
Android studio warns and suggest wrong encoding but reloading with multiple other encoding did not resolve file contents.
What should be a solution?
Should I change hardware, eg ssd? or downgrade android studio?
Please run android studio like this.
Click Android Studio and click right button on mouse, then click "Run as Administrator".
Hope it helpful for you.
I was working on a Project and this required me to reinstall the latest version of Android Studio. After the Installation when I opened the Project I,m getting this error.
I have tried the single answer available, but it won't work. I am using te latest version of Android Studio (3.1.1).
"ERROR: Data error (cyclic redundancy check)"
I have the same problem and the problem was that there was a corrupted file its name appear to me in android studio, that file android studio can't read as there was a bad sector in its hard location
Solution for me was to copy file content from android studio and create new one with the same in its location , hope it help others,
I know this a duplicated question but i didn't find any answer validated for the problem .
I made the all the solutions in this question: Android Studio 3.0 - Unable to save settings: Failed to save settings. Please restart Android Studio
but what if my project wasn't a local project and is a remote project on Git .
every time i pull the master from git , this problem is showed up .
the problem was also in Version 3.0 even after updating the Studio
my version of Android Studio is 3.0.1
This wasn't easy as the error doesn't look like others in the questions i mentioned above .
First
if your message error has word plugins in it you should see these answers Here
and these answers Here helps too .
In My Case
the error is found if i tried to Revert Font File in the project we worked on as the message appears every time i launched Android Studio. I work remotely with others on GIT. So this is a a change in the master i pulled and every change i make in my branch wouldn't save.
I don't know if this rule is important if you work with git but i finally didn't make Revert to the file so the error message didn't show again and in the next launch of Android Studio the Revert message didn't show
Recently I encounter the same issue, After updating the android studio I faced this issue and I tried all the possible solutions found on the internet.
My project has multiple modules and one of the modules is present inside a custom folder. (The same project has worked without any issue in the windows environment).
For example, In windows, the path for the module is "/internal/module name".
After importing the same project in mac the path should be changed to "./internal/module name".
After doing this the studio errors,
- Unable to save the setting
- Unable to find a matching configuration of the project.
All are resolved and I am able to build my project successfully.
Delete .idea and restart Android Studio.
I am using android studio 1.0. I am developing a small android application. When i was editing the code in one of my java file in android studio, power cut happened.
After power came, i open the android studio and open my project, all files in the java folder marked as red indicationg error.
but the projects build successfully. when i sync with gradle.
it also done successfully. and perfectly runs in the device after launced the app in my phone.. but the red mark not disappear
even i close the project and reopen. If i create new project also, the same things happen again.
i can't understand what's happened. i also tried re install my jdk 1.7
Can anyone help me, how to fix this bug. please give exact solution. i don't like suggestions like to re install android studio
Try to Update to androidstudio 1.2
Close Android Studio
Go to C:\Users\user\\.AndroidStudio2.3\system\caches directory and delete all files.
Restart Android Studio
Done.