Open BanDroid opened 4 months ago
e3333a2c5e9533d0b909900648ea9c072e01ffa5
already fixed dependency package name, but now the problem is the object of our own package.
i have created MyClass.kt but the completion and diagnostic doesn't know it was exists.
kotlin and java dir are being added to the claspath, in alpha03 version I checked it is same java file are being added to the claspath, but I don't know why it's not working with compiler
i realize now java is working just fine, the only thing that doesn't recognized was kotlin classes.
i've checked that any of kotlin classes i created is not exist in build folder, it seems the incremental compiler ignored kotlin files except when build.
there is no MyClass.class anywhere inside build, but the build is just fine and could use the class.
With java completion I think it adds the kotlin class only and but it give error in diagnostic but we can build it Maybe it needs to include runtime jar (kotlin classes) then it will work normally with java And also maybe kotlin Compiler will able to get it's own classes by .jar
I tried to build jar package while analysis but they are in classPath but it didn't recognise it
even after build and kotlin files compiled to .class in build, it still cant be recognized by lsp, this problem is also occuring with viewbinding classes, if i create a new layout file, i have to compile first to make the class generated, after i create a layout file, there's a Binding class generated in /build/injected/view_binding
but not in /build/view_binding
, it seems you have to remove /build/view_binding
and keep /build/injected/view_binding
to make it work.
Since I
implemented realtime compilation, when you start editing it will start to compile and package as jar, and they are added to classPath but when changes it doesn't update compiler configuration , so they are packaged as realtime
View binding updates with real time in kotlin it will not work
in this commit 4cdecbbc34e136c7ab70a305e430e50e285ddb67
the first problem exist again, doesn't want to recognize dependency package.
when you start editing it will start to compile and package as jar, and they are added to classPath but when changes it doesn't update compiler configuration , so they are packaged as realtime
i dont have this in latest commits, there's no kotlin_runtime
enable isCompilerEnabled in .idea/app_compiler_settings.json and try editing kotlin files
enable isCompilerEnabled in .idea/app_compiler_settings.json and try editing kotlin files
tried multiple times with different new projects, result are no kotlin_runtime folder generated.
Which Android version
Which Android version
10, infinix note 8 64-bit
@BanDroid Uninstall and try again with latest version
still the same, and now the autocomplete window does not even show
@BanDroid Try this
class App {
}
{ "java": { "isCompilerEnabled": "false", "sourceCompatibility": "1.8", "targetCompatibility": "1.8" }, "kotlin": { "isCompilerEnabled": "true", "isKotlinCompletionV2": "false", "jvmTarget": "1.8" } }
implementation 'org.jetbrains.kotlin:kotlin-stdlib:2.0.0-Beta4'
Project - Application Kotlin
still hasn't resolved this, tried with many things, 1 thing that could be a resolver was to build the apk first, it will generate .class of kotlin classes, but after i exit codeassist and reopen the project, still cant recognized by the lsp.
also, kotlin_runtime still not exist even i turn on any settings in compiler_settings.json.
improvement:
i just got this kotlin_runtime folder, somehow it does work now (after updating to new release version from release download page, not ci build) but still giving error (not warning) in diagnostic about metadata.
edit:
sometimes other class couldn't be recognized, but then its own class file is recognized (see third image). this also happen in MainActivity.kt
, it shows MainActivity class but not MyClass.
Great 😃 I think kotlin compiler trying to compile the source but it's giving error metadata different versions , so it fails and not successfully compile So we used different kotlin compiler that compiles with different version 2.0.0-Beta4 I tried to add skip metadata but doesn't work in compilation environment
maybe set isCompilerEnabled
to true should be the default when creating new project, i had to force stop CA to make this changes applied somehow.
New Latest kotlin compiler is experimental it may give some errors
Note that Issues are for bugs only. Use the discussions tab for feature requests.
Describe the bug i use latest ci release, in my kotlin and java code, any dependency package cant be recognized in diagnostic.
To Reproduce Steps to reproduce the behavior:
Expected behavior the diagnostic did not shown error.
Screenshots![Screenshot_20240305-233328.png](https://github.com/Deenu488/CodeAssist-Unofficial/assets/68449470/06e2adae-d2bc-48b3-a377-6099337070c8)
Smartphone (please complete the following information):