audioplayers icon indicating copy to clipboard operation
audioplayers copied to clipboard

kotlin-error

Open XaV-BoT opened this issue 3 years ago • 5 comments

Audioplayer error

When i try to run Audio player it throws me error like kotlin requires new version but i hava already upgraded all the version.

Code to Reproduce A minimal reproducible example, i.e., code that allows us to replicate the bug. This is mandatory. It can be one line, if it already is enough to reproduce (rarely is), or a bigger example with all your relevant code. You must use code blocks to put your code in. Don't send your whole project repo, please read the article linked and extract a minimal example, but feel free to link a newly created sample repo reproducing the issue instead of pasting code if necessary (rarely is). If you do link a repo, you must put in at least a little bit of the relevant code and where to find it in the repo.

Log Errors If your problem involves log errors or messages, please put them here, in full, but feel free to highlight the parts that are relevant. You must use code blocks (or gists) to paste in log lines. An absolutely outstanding example would be to add a code block with 2-3 relevant log lines, followed by a link to a gist with the whole log from which the relevant lines were extracted.

Files/URLs/Sources If your issue or bug involves specific files, you must provide them. If they are URLs they should already be somewhere in the code provided but please replicate those here. If they are private URLs or actual files, please upload them somewhere accessible and add them here. If your issue is with a stream, for example, provide the stream link or if the stream is private, create a similar stream that also causes the problem and is public, and add that. If you don't know if your issue involves specific resources, please download a few of the mp3 sample files present in the example app and test with those instead of whatever you are doing currently. If the issue persists, it does not involve specific files. Otherwise, this section is mandatory.

Screenshots If applicable, add screenshots or video recordings to help explain your problem. This is totally optional.

Platforms List in detail here all the platforms that you have tested, indicating which platforms the error occurs on. Please try to test on as many different platforms as possible to make our lives easier (this is optional). You must add at least one platform in which the problem occurs (evidently). For each platform listed, you must specify:

  • OS: web, android, ios, macos, etc. if web, which browser was used.
  • OS version: the android version, ios/macos versions or browser version used.
  • Device: whether it was a physical device or emulator/simulator. If running on a physical device, what brand/model/kind of device was used. If running on an emulator, what host desktop was used. For web/desktop, what desktop OS and version was used.
  • flutter version: what exact flutter version you used. If you think it might be a configuration/setup issue, feel free to add a link to a gist with the output of flutter doctor -v (this is optional).
  • audioplayers version: what version on pub you used, or if you built it yourself what branch and was the latest commit hash
  • release or not release: specify if you ran the app in release, profile or debug modes. Also specify here any additional flags or conditions that might be relevant (for example, if you ran flutter web with the skia use canvas flag set to true, please mention that here).
  • does the error occur and does it have any peculiarities: of course if you only tested in one platform, clearly the error occurred there. But if you happened to test on several platforms, please include all of your tests, even the ones that succeeded here, as that info is super valuable. Add details of what was the result in each platform to the extent to which they differed. Screenshot (6)

XaV-BoT avatar Jan 26 '22 03:01 XaV-BoT

Is there a fix?

ethanenkhtur avatar Jan 27 '22 07:01 ethanenkhtur

Is there a fix?

https://youtu.be/HAz3y7RCABo

go through this video ! btw its my channel.

XaV-BoT avatar Feb 01 '22 01:02 XaV-BoT

I get the same if I try to open the android module in Android Studio. Changing the kotlin version to 1.6.10 does not help.

maitycyrus avatar Feb 11 '22 14:02 maitycyrus

updateing the android tools solved the problem in my case.

classpath 'com.android.tools.build:gradle:7.1.1'

maitycyrus avatar Feb 11 '22 15:02 maitycyrus

That solved my issue with Kotlin

I added

kotlinOptions {
    jvmTarget = '1.8'
}

into app>build.gradle

android {
compileSdkVersion 30

sourceSets {
    main.java.srcDirs += 'src/main/kotlin'
}

kotlinOptions {
    jvmTarget = '1.8'
}

defaultConfig {

ekoRemDev avatar Apr 01 '22 10:04 ekoRemDev

Should be solved by now.

Gustl22 avatar Sep 27 '22 16:09 Gustl22