I haven't found solution for this. Whenever I click run project, nothing happened. After several times hitting the run button, I realized there are plenty of "NoClassDefFoundError: com/intellij/notificataon/Notification" showed in the Event Log. Isn't it error because of the typo in "notificataon"?
I was just fixing some minor bug and I tried to run and this happen. before this everything run fine.
I tried to clean, rebuild, invalidate cache and restart android studio, same problem still presist.
Is someone have idea what's going on? How to fix the "notificataon" part ?
EDIT:
it's fixed for now but I still can't figure out how to fix this bug. I ended up re-install Android Studio and now it works again.
There is a 'ghost' bug with Android Studio and people have reported that the problem can be fixed with one (or more of the following) :
1) There is a conflict between the project's android support library version and the version in its library projects.
Set the same version to the android support library in the project and in the library projects that are included and then run build clean.
2) Clean Android Studio's cache by doing File->Invalidate Caches/Restart
3) Look for broken inclusions (such as .jar files that have changed and/or been removed) and solve them (add new/incorrupt versions)
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.
While I was working on a view on my project, Android Studio suddenly started to show me 'Waiting for build to finish' message when I try to edit some layouts.
I have researched on the Internet and none of the solutions worked.
Things I've tried:
Removed .gradle folder from root of my project and from my home
folder (MacOS)
Uninstalled and reinstalled Android Studio with all it's leftover files. It was a complete removing.
Tried to tweak androidx library versions.
Clean / Rebuild Project
Invalidate cache and restart
Try on an empty project
Try on an existing but different project than I'm having trouble with.
Updated to latest version Android Studio 3.5
Updated to latest gradle and gradle plugin
In short, nothing on the internet or on the stackoverflow helped me.
Edit: I have solved the problem by myself.
Solution is found by myself.
If Android Studio keeps telling you waiting for build to finish, it's actually waiting for build to finish.
Sometimes people get confused when the status bar of AS says 'Gradle Build finished' but actually it's important to check the actual build is completed or not.
In Build screen there's a tab called 'Build Output' and I noticed that my app poped up some errors related to androidx and android support libraries. So I went back to non androidx version of my project and everything seems to working just fine.
There was a dependency for camera view using androidx and so I migrated my whole project to AndroidX because I was depreate enough to use that library no matter what happens. It ended up taking my whole day for fixing it.
For some reason whenever I open my project in Android studio it looks like this
It happened before, I tried to reinstall Android Studio which fixed it for like 1 hour, then the same thing happened again, tried to reinstall android studio one more time and now it just doenst work at all.
.
Thank you very much for any answers
This is faced by many developers like me after updating to AS3.
Try Import Project... and navigate to your project. Select build.gradle file.
Be sure to wait for a while, so that android studios can load all your stuff. Sometimes a restart will help.
Gradle sync success is needed, cause project files will not be indexed if gradle build is not successful.
I have a problem with Android Studio. Since this morning I can't edit my layouts through the Design interface. It's stuck on "Initializing Rendering Library" and the IDE freezes. All my layouts were working well yesterday and I haven't changed anything since then.
I have tried to invalidate the cache and restart but without any result.
Try that steps :
1.Update Android SDK and Android Developer Tools.
2.If that will not help, reinstall Android Studio using the newest available version (remember to do a backup of your data and projects).
3.If that will not help, install other IDE for example Eclipse and import all your projects to it.
Good luck !
For me helped such steps:
Remove .gradle folder from the project folder, all *.iml files and
.idea
Remove C:\Users\username.AndroidStudioPreview1.2
Run Android Studio without importing settings. This will allow to see a dialog where you can open your project from scratch. If you
import settings then Android Studio will open previously opened
*.xml files which caused the problem (hanging "Initializing Rendering Library") and the situation will happen again
Run Gradle cleanup
Sync project
Invalidate cache and Restart
Build the project from command line. If use Build from AndroidStudio I got hanging "scanning files to index..."
I reinstalled my android studio without success,
Then, I downloaded the sdk again, and change my old sdk-path to the new one
After I restarted my studio, it works.
The most mysterious thing is, I rechange my sdk-path back to my older one, then every thing is ok,I don't know why,but it solved the problem