I want to install other pack ages apart from the ones that come with compose.
Example:
For lotties files animation
implementation "com.airbnb.android:Lottie:3.7.1"
And
For curved bezier bottom app bar
implementation"com.etebarian:meow-bottom-navigation:1.3.1"
It keeps giving error messages from
CheckDebugAarMetadata
Downwards
#Opeoluwa-Muritala, I've tried both of the libraries in my Jetpack Compose Project. It's working perfectly fine. Maybe the error is regarding the Gradle cache or the builds cache.
You can try
• Clean and rebuild the project,
• Invalidate & Restart the Android Studio,
If still not works then you can try another option is, close the Android Studio and then rename the '.idea' folder to '.idea_old', and the '.gradle' folder to '.gradle_old' and remove the build folder under the app folder.
Related
I started learning App development in Android Studio, using the Flutter UI toolkit. Everything seems fine, however when i want to create a New Image Asset to edit my app's icon, i can't find it. When i right-click the android/app/src/main/res folder, it does not appear within New. I am following some older tutorials and they all have that option there.
This is what comes up:
My version of Android Studio is:
And my version of Flutter is: 2.8.1 (Dart 2.15.1)
How can i fix this, or are there any alternatives for modifying my app's icon?
Does it work for you? If that doesn't work, try right-clicking the drawable folder and selecting "New" -> "Image Asset".
Try to do the following:
Right click on res directory -> Choose Mark Directory as -> Resources root
If it is not working, try to change file view to Android:
I got it to come up when I right click on the root node of the project (a flutter project) and selected flutter -> Open Android module in Android Studio
Then I was able to right click the res folder and clicked on new -> Image Asset
Ah, I've seen this before as you're using Flutter. Despite all the answers, I'd recommend you to right-click the android/ folder from your Flutter app root and select Mark as... > Project Root, then close and reopen the project in Android Studio.
If Android finally recognizes this as an Android project, it will take a long, long time to download some of the project's dependencies (in which some of them are already downloaded through flutter pub get and flutter run/build. After it's ready, the project files will be finally available for you, including the option to launch the Image Asset Studio.
Update To Latest Version Frist.
Android Studio Dolphin | 2021.3.1 Patch 1
Visit https://developer.android.com/ And Download Manually And Install.
After You Can Find Res/New_resources_deirectory/midmap
It's Very Simple.
#Android_Studio
For Flutter users: If you created the Android project via flutter create, make sure to open the Android Studio project in the android subfolder, not the one in the root folder. Then, Android Studio should automatically run gradle. Once this has finished (which can take quite some time on the first run), the Android Studio UI should automatically switch to the "Android View", and the "New > Image Asset" option should become available for the res folder. No need to manually mark anything.
Just make sure that gradle runs through, otherwise the real "Android View" won't be available, even if it is selected.
I have faced same issue and this suggestion really helped me. Hope this will help you too.
https://stackoverflow.com/a/66773774/20910266
To me the key point is this:
"don't open the whole project of flutter using Android studio just open the android folder found inside the flutter project with Android studio, so the Android studio can treat it as a Android project rather than flutter project, which will give you all Android features like the one ur looking for #image asset studio".
Picture of problem
I already tried to modify the type analysis of android studio, restarted and recreated the project.
I reinstalled Android Studio and tried different Flutter SDKs and Android Studio versions, but I cannot work with .dart files named "login_event.dart" and "auth_service.dart", because Android Studio isn't recognizing them as .dart (no linting, just plain text, as you can see on the icon type in the picture).
I have over 40 other dart files in the project which all are working fine.
Just these two specific names can't be identified.
Even if the compilation of these to files is working, is is still annoying not to have advantages of normal dart files while coding.
Why this error occurs only exclusively with this naming, globally on my system regardless of AndroidStudio version and project is very incomprehensible to me.
It looks like Android Studio just doesn't want to recognize some names.
call flutter clean or to invalidate it using File > Invalidates Cache / Restart... ? solved the problem
Ever since i upgraded to android studio 3.4 and going forth to 3.5.3 and i been experiencing projects that i used to work on earlier in the day suddenly fail to load and modules can't be read and opening any files .xml , .gradle all i see is the something like below:
I tried :
resetting the encoding to UTF8 from android studio settings > editor
invalidating the cache and restart
delete the .idea folder and reloading project
Nothing works, unless i have a copy of the same project or have it on Github and clone it again and re open it.
Note:
while the files look like the image you see in android studio, opening any of them in an editor like VScode shows the correct contents of the file
Anyone have a clue, because this is really frustrating
TL;DR
disable Dart and flutter plugins in File > settings > plugins menu,
reopen your project like you usually do.
Extra steps that could help:
clear cache
delete the .idea folder
delete all .iml files from you project as suggested by #Max Shwed
How i got there:
The issue mentioned above kept happening in a number of android projects old and new.
before uninstalling AS an reinstall i thought i give it one last try, i cleared the cache, delted all the the .iml files manually along with the .idea folder.
After that i imported the project and let AS regenerate the deleted files, one weird thing happened is that my build.gralde file was looking totally different there was Dart code inside it and package import from dart, while the file was completely unaltered when opened in any text editor (thankfully AS didn't re-write the file) it was simply built differently in AS view.
Suspecting Dart plugin to be the problem since i have some demo Flutter apps i been working on , i disabled the Dart plugin and just re-opened my project and Voila everything looks fine and project built successfully and run.
i think it's flutter framework issue
but i have a solution that i tried and fixed this
just make right click in your distributed file -> local history -> show history -> and revert one step
it will get your original code without any formatting
and wait for the next flutter plugins to update
In android studio, I had a project that was working in first place but then I created multiple copy of it in other paths to add changes to these copies instead of the original.
Afterwards, I noticed that the emulator shows up but doesn't launch the app I am trying to run. I followed a tutorial on YouTube that opens the setting app on the emulator and clears launcher data. then nothing changed.. I noticed that no matter how many changes I am adding to the file, nothing changes in the old app icon existing on the emulator.
Things got much worse later when I noticed that there is no modules or any other folders in the project structure except the SDK and when the older project versions were found to have same problem suddenly.
Even when I create a new project that is empty, same thing happens and the app crashes once it's installed.
Android app icon button before run appears in the project with a red cross over it.
Both the emulator and the mobile device don't get the latest version of the app I am trying to install.
I tried to make project, build, run, clean project, sync with gradle file, invalidate cache & restart. However, none of these solutions seem to work.
No idea what is going on.. things seem to be messed up and all online sources seem to be less useless to me.
Note: I am using Android studio V 1.1.0
so, I found that the best solution to this problem is to uninstall the current version of Android studio and SDK folder and reinstall it from scratch.. hope that helps
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