I have a Kotlin Multiplatform Project which contains an android library target. That library is imported to a separate android app project:
// settings.gradle.kts
include ":sharedLib"
project(":sharedLib").projectDir = file("../path/to/sharedLib")
Whenever I sync my app project in Android studio both the app and sharedLib projects sync in parallel. I am pretty sure this is some IDE setting i fluffed up when debugging source resolution with the sharedLib a while back.
Any ideas what AS settings i might have messed up? I actually removed AS and reset the configuration and yet I am dealing with seeing dual syncing.
Turns out it was some config stored in my project's .idea directory. Cleared it and everything is happy again.
Related
.0. I imported a project to the PC (specifically here = generated Ktor project, although I've seen such behavior before with Compose Desktop projects)
Generated here
.1. IntelliJ Idea doesn't recognize it as a project
When I open the same project on Android Studio = it works fine
Here is how the project supposed to look in IntelliJ (this Ktor project I build manually with IDE and it worked):
.2. I was able to make the project folders visible to IDE:
Repair IDE->Rescan Project Indexes->Reopen Project
Now It look like this:
But IDE still doesn't see my modules properly
How do I properly configure the imported project?
Note: I've read IntelliJ does not show project folders
And tried methods described there. But a lot of answers are hard to replicate as IntelliJ interface changed.
Edit: I've fixed it with Manage Idea Settings->Restore Default Settings. Now projects are opened properly. Thank everyone for your time.
I've fixed the problem with Manage Idea Settings->Restore Default Settings. Now projects are opened properly. Thank everyone for your time.
Android Studio lost all the run-configurations of a project and it is not the first time this happened. This always occurs (as far as I can tell), when switching projects and/or having opened an Android project in IntelliJ IDE.
In an attempt to restore them, I've reverted several missing .xml files from the .idea directory, including runConfigurations.xml, which did not yield the desired result. the documentation does not really help either.
Q: Where are these run configurations being stored, (in order to keep a backup of them)?
As described in Run/Debug Configurations Dialog documentation when: Share check-box is enabled Run/Debug Configuration files are stored under .idea/runConfigurations/ directory.
I have a problem. After I imported a project in Android Studio, in the activity java files it says "cannot resolve symbols" at certain lines, and they are with red, even though the project was fully valid before. The project has all necessary imports too, but some are with red too. The thing is that gradle build is working fine without errors and app launches in the emulator. I have tried invalidate cache and restart and sync gradle with project files. Do you have any ideas. ?
SOLUTION:
In build.gradle(Module: app) file, update the dependencies and sync.
I my Project tab I'm using the "Android" mode which conveniently groups all Gradle scripts together. I can only see the build.gradle files for the modules though, not the top-level build-gradle. Is there a way to list the top-level build.gradle here as well?
Look for the one labeled Project: [project name without the brackets]:
If you can't see it, it most likely doesn't exist (or Android Studio doesn't see it). Make sure it exists, and if it does, invalidate caches and restart*. If it doesn't, create it.
* A lot of issues related to Android Studio can be fixed this way. If the gradle file exists, but Android Studio isn't seeing it, invalidate the caches and see if that fixes it
I have got some open source projects which I want to have a try. But I want to use Eclipse if the project was made using eclipse; otherwise I would like to use Android Studio.
So how can I know by viewing the source code about the IDE used for the development of a particular project? Is there any metadata in any file which stores the IDE information?
I believe that Android Studio sometimes includes gradle related files. That's how I would check.