I am trying relentlessly to import this project into Android studio as part of my Udacity Android development courses. I tried everything from forking on GitHub and cloning it into my Android studio to changing the Gradle settings, the Java version, following the recommended settings by android studio, etc.
https://github.com/udacity/ud839_CustomAdapter_Example
Nothing seems to be working. I keep getting errors. Each time I fix the error I get another error. Can someone please guide me as to what exactly is the proper procedure for importing an older project into the android setting and updating the settings? I seem to be experiencing the same issue every time I am completing online courses. The existing projects appear to be completed through older versions of Java and Android studio. Any help is greatly appreciated.
Thank you
I've heard recently about Gradle's Version Catalog and decided to give it a try... Everything setup, Gradle wrapper set to gradle-7.0-rc-2 and everything runs fine and I am able to build.
Android Studio, however won't identify nested dependencies, showing this exception:
Cannot access class 'org.gradle.accessors.dm.LibrariesForLibs.AndroidxLibraryAccessors'. Check your module classpath for missing or conflicting dependencies
app/build.gradle.kts
implementation(libs.androidx.coreKtx)
gradle/libs.versions.toml
androidx_coreKtx = "androidx.core:core-ktx:1.5.0-beta03"
How may I get rid of that AS error?
It looks like issue was fixed by IntellIJ team (https://youtrack.jetbrains.com/issue/KTIJ-1221) a while ago, but stable Android Studio uses fairly old IntelliJ platform.
On the bright side, it appears to be fixed in the new Android Studio Canary (Android Studio Arctic Fox | 2020.3.1 Canary 15 works fine).
I've created an issue on Google's bugtracker. I know the chance is slim, but maybe they notice it and backport the fix to 4.2:
https://issuetracker.google.com/issues/187326581
Have you tried to rename androidx_coreKtx to androidx-coreKtx? After that change you should be able to use implementation(libs.androidx.coreKtx)
Make sure that you have enableFeaturePreview("VERSION_CATALOGS") in your settings.gradle(.kts)
In my Android project (Android 4.2 Canary 15), completion does not work anymore, and neither does syntax highlighting. This is happening in one Android project only (the others work well).
I have tried to clean, rebuild the project, create a new project and import files, but no changes... I have tried to delete .idea directory and all .iml files, but not better...
In the "File" menu, I've just tried the option "Invalidate caches / restart" and now all classes in my project are blocked at the state "Analyzing..." and completion still does not work...
Build and run project work, and my application starts well on my phone, but all intellij features
are inactive.
It appears that the Kotlin plugin was, indeed, the culprit.
Today (24 May 2021), a new version was released 1.5.10, and as soon as I installed it, everything went back to normal.
Synopsis: After upgrading from version 1.4.32 of Kotlin plugin to 1.5.0, code inspection, completion, linking to sources, javadocs, etc. all stop working (stuck at "Analyzing..." as the images here and here show), and only return for a few seconds/minutes when sth triggers a new analysis (eg. a gradle build, commit, loading new files, etc).
History of the plugin updates for reference can be found here
you can just change the Kotlin version to something else and then gradle sync again
This will solve the issue
you will find it in build.gradle file(project)
ext.kotlin_version = "1.5.10" //I used this
you can also roll back to your previous version. If you want this should not recreate the issue.
Android Studio -> File -> Invalidate Caches and Restart
Nothing else helped me.
Try it:
File --> settings --> Plugins --> Android ButterKnife Zelezny --> disenable
From my project I deleted the files
.idea/gradle.xml
.idea/workspace.xml
and it solved it for me.
Seems to be that I had previously configured the project's gradle incorrectly and even after several reinstalls I wasn't getting any luck.
I just update the Koltin version to 1.5.20 and it works!!
Kotlin version 1.4.10 magically stopped working in the IDE.
The problems are not related to the IDE version but rather to the integration of the kotlin plugin and the IDE.
kotlinVersion = '1.5.10'
classpath 'com.android.tools.build:gradle:4.2.2'
Then Sync Project and Compile.
Finally you can see that the problem of Analyzing disappears and the IDE becomes intelligent again.
It is possible that after updating kotlin you have minimal errors in other libraries so you also have to update or fix them (I happened with Room)
GL
This is a looming AS IDE issue correlated with the Kotlin plugin, Have tried literally every answer here with tooth and nail, but nothing worked. There were chains of errors. Finally, removing the AS cache folder manually worked for me -
%USERPROFILE%\AppData\Local\Google\AndroidStudio2020.3\caches
Artic fox sucks!
You may also try to update the Kotlin plugin to the latest if possible and see if it makes any difference.
The one solution that worked for me (working in Canary 2021.1.1) was to completely uninstall the Kotlin plugin from Android Studio, restart, let Android Studio install it automatically, and then everything worked again.
The root cause of this issue was that Android Studio "accidentally?" updated Kotlin plugin to an M1 version (I'm on x64), namely 211-1.5.30-M1-release-141-AS7442.40, when updating the plugin. I'm not sure why, but from now a check of what is going to be updated in Canary seems mandatory to avoid these kind of stuff to happen.
this issue comes from plugins
1- update plugins
2- step by step disable plugins to find incorrect plugin
3- as advance people please report issue to providers for solve the problem
in Arctic Fox version (2020.3.1) I fixed it by updating Gradle Plugin version 7.0.0.
This solution is 100% working for the above issue
ext.kotlin_version = "1.5.21"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
In my case, I just update the dependency "androidx.core:core-ktx:1.3.2" to "androidx.core:core-ktx:1.6.0". And it's gone, working normally
After many hours, I finally uninstalled Android Studio, delete all Android directory, clean registry and reinstall Android Studio stable version.
disable Compose plugin. the only way work for me.
If you are using
Jetpack Compose 1.0.5 (haven't tested with 1.0.0-1.0.4 but they should work too)
Java 11
Kotlin 1.5.31 (tested 1.5.10 working too)
the other answers don't work
What works is the following in your project build.gradle:
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
jvmTarget = "11"
useIR = true
freeCompilerArgs += [
"-Xallow-jvm-ir-dependencies",
"-P",
"plugin:androidx.compose.compiler.plugins.kotlin:suppressKotlinVersionCompatibilityCheck=true"
]
}
}
(compose compiler was blocking Kotlin compiler from completing jobs)
and Invalidate Caches & Restart
for me file analysis is only getting stuck in kotlin files with co-routines. upgrading co-routines version to the latest helped me.
Sometimes some files are stucking to me at analazying, I resolve that issue by:
Just copy / paste that file with the different name
Then remove the original file and rename the copied file with the original name.
I uninstalled kotlin plugin and at this moment my Android Studio crashed.
People in the internet said i should delete deleted_plugins.txt and it'll work again but unfortunatly it doesnt worked anymore.
I uninstalled whole android studio multiple times and evene followed a couple instructions how to completely delete Android Studio from my PC but still, when im going to install it again the same error:
Missing essential plugin:
org.jetbrains.android
Please reinstall Android Studio from scratch.
Shows up again and again. I also tried to go to Visual Studio Code, but i need Android Studio for the emulator to work so i have no choice then fixing this.
I cant do anything at all so please help me I appreciate any help.
I suggest you to take a look at JetBrains' Toolbox App. You won't need to worry about manually installing/uninstalling IDEs (developed by JetBrains) anymore!
A while ago my designed Flutter app was running like it should in simulation (virtual device) in Android Studio. After some updates of both Flutter as Android studio I am not able to get the app in simulation. I am new to Flutter and Android studio (have a little knowledge of Xcode, 2 apps in the store) so I have looked at stackoverflow first to find a solution. All tried suggestions did not worked for me and I am hoping somebody can help me.
I have an original version of the project which was running in simulation mode. Now I am working in a duplicated version to find out how to get things up and running again. It worked before but why does Flutter or Android Studio give an error now? The folders and content do exist. Perhaps it is a simple thing to solve but it is not in my knowledge.
What to do to solve the error message I get as shown in the screendump?
The problem seems to be with the resources,
this should help.
Android Studio error: cannot resolve symbol in Xml
Or try to run "flutter clean" (usually solves many problems)
Flutter studio sometimes does not resolve those (no idea why).
Try opening the same Android project in Android studio and check it from there.
Once back, try File->Invalidate Caches/Restart
If they exist and the name is right (without extension), then it could be it.