I'm practicing LeetCode with Kotlin for a few months. Every time I start a new question, I will make some test cases to make sure my understanding is correct to the question.
But today, somehow I see a weird error in LeetCode I have never seen before.
Here is Java code, I got the wrong answer.
Here is Kotlin code, I got the compile error.
I google the error log and find this, and it tells me to update Gradle. But I can't, cause there is no build.gradle file in LeetCode.
Can anyone help me how to solve this problem? Thanks!
It was a bug in the Leetcode's backend itself. Basically some files were missing in the docker image for Kotlin due to which it was happening. Leetcode has fixed the bug and replaced those docker images in their backend. So, it should be good now.
PS: I work at LeetCode.
Related
I have a project on which I worked last year. Recently I started working on it again but wanted to update everything that was possible. I managed to resolve basically all problems except this one. I can't find anything online about this warning. I get it when I build the project. I tried downloading and using the latest tapjoy jar but it still appears. In the warning there is a path to a cache folder so I tried deleting it but id didn't change anything; maybe I'm getting this warning because those folders are missing?
The full warning is like this:
AGPBI: {"kind":"warning","text":"Expected stack map table for method with non-linear control flow.","sources":[{"file":"C:\\Users\\black\\.gradle\\caches\\transforms-3\\91514d5ad9a3a762574d6c5e2880beba\\transformed\\jetified-tapjoyconnectlibrary.jar"}],"tool":"D8"}
The problem is that i have around 200 lines of this warning in console and I would like to solve them.
Has anyone seen this warning before and knows how to fix it? Obviously any help is much appreciated.
The missing folder should have nothing to do with this warning. I had this problem in the process of writing custom gradle plug-ins. It seems that ClassWriter or ClassVisitor in ASM did not implement any method, there will be this warning, but that does not affect normal functionality. You can check that your project has used those gradle plug-ins, perhaps these plug-ins are caused by the update of the problem.
I recently noticed a behaviour, that the default code analysis does not finish anymore in one of my android projects, in particular in kotlin files - unfortunately without an error message. With a stuck analysis I am not able to identify errors in my code anymore and basic stuff like autocompletion does not work, which makes it unable to work.
In the top right corner of the opened file I constantly get Analyzing...
I already tried restarting Android Studio, invalidating its cache, deleting and cloning my project again, rebooting and deleting all kind of gradle and Android Studio cache files but without success.
I finally got it working again with the help of the idea.log file, which can be found via Help > Show Log in Explorer in Android Studio.
The log stated an Exception while analyzing expression at different locations in my files, caused by java.lang.IllegalStateException: #NotNull method org/jetbrains/kotlin/builtins/KotlinBuiltIns.getBuiltInClassByFqName must not return null.
Since it looked like a Kotlin related issue, I upgraded org.jetbrains.kotlin:kotlin-stdlib-jdk7 in my build.gradle from 1.4.10 to 1.5.10 and it worked instantly again. I hope the info helps anyone!
Please remove butterknife plugin in Settings-> Plugin. It is worked for me in java files.
I am beginner to Android Studio and not a programmer either.
Our team is building a rather big android APK; lately we encounter this error which we do not have solution. When it happens we simply cannot continue with the project; we have to retreat back from the last addition we make.
This error occurred as I tried to improve the XML file. It is confusing as to where to locate the source of the error. Perhaps any of you may have solution or suggestion.
Any help will be appreciated.
Error Screenshot
[https://pastebin.com/LqZYtP2t][2]
One possible explanation for your issue is that the xml file does too much, perhaps you could try to split it in multiple class instead.
I'm new to Android development. I'm having trouble importing from camera2 package.
Here is a screenshot of the failed imports. I don't understand why some of them succeeded while others not.
Really appreciate any help. Thanks in advance.
Edit:
Thanks, but I don't think it's the problem with my minSdkVersion.
The failing imports are internal to Android framework. They are not available to apps. You should be okay if you simply delete all these lines that are marked red. If your code does not compile after such cleanup, post an update with specific error messages.
I have been trying for last 2 days to compile a helloworld project for android. It had been giving different errors so far but I found my way through using the different questions asked here by users or at stackoverflow. But now, I have searched everywhere and couldn't find a proper solution anywhere.
When I try to run the build_native.sh in cygwin, it starts compiling but in the libgame.so shared library, it gives an error with exit code 1. Other guys have been getting this type of errors but none of their solution work for me.
I have checked the android.mk and the references are the correct.
Every way I tried has failed. I need serious help :(
Thanks a lot :)
P.S I am using windows8 (64 bit).
I didn't set up the paths in the main.c file. It needed to be pointed to the right folder (classes) Unfortunately no article or tutorial mentioned it, managed it by trial and error.