Fintasys / emoji_picker_flutter

A Flutter package that provides an Emoji picker widget with 1500+ emojis in 8 categories.
MIT License
170 stars 127 forks source link

Error while adding this package and running #184

Closed raman04-byte closed 10 months ago

raman04-byte commented 10 months ago

FAILURE: Build failed with an exception.

pubspec.yaml:

environment: sdk: '>=3.1.4 <4.0.0'

dependencies: flutter: sdk: flutter

cupertino_icons: ^1.0.2 flutter_fortune_wheel: ^1.3.0 google_fonts: ^6.1.0 animated_icon: ^0.0.5 firebase_auth: ^4.15.0 firebase_core: ^2.24.0 google_sign_in: ^6.1.6 flutter_facebook_auth: ^6.0.3 flutter_octicons: ^0.42.0 otp_text_field: ^1.1.3 camera: ^0.10.5+6 connectivity_plus: ^5.0.2 image_picker: ^1.0.4 firebase_storage: ^11.5.5 cloud_firestore: ^4.13.5 flutter_animate: ^4.3.0 flutter_webrtc: ^0.9.47 socket_io_client: ^2.0.3+1 snippet_coder_utils: ^1.0.15 flutter_webrtc_wrapper: ^1.0.2 uuid: ^4.2.2 shared_preferences: ^2.2.2 flutter_share: ^2.0.0 go_router: ^12.1.3 uni_links: ^0.5.1 country_picker: ^2.0.23 scroll_date_picker: ^3.7.3 intl: ^0.19.0 firebase_crashlytics: ^3.4.8 http: ^1.1.2 url_launcher: ^6.2.2 flutter_markdown: ^0.6.18+2 cached_network_image: ^3.3.0 image_cropper: ^5.0.1 firebase_messaging: ^14.7.9 video_player: ^2.8.1 gif: ^2.3.0 carousel_slider: ^4.2.1 smooth_page_indicator: ^1.1.0 path_provider: ^2.1.1 audioplayers: ^5.2.1 path: ^1.8.3 file_picker: ^6.1.1 emoji_picker_flutter: ^1.6.3

dev_dependencies: flutter_test: sdk: flutter

flutter_lints: ^2.0.0

flutter:

uses-material-design: true

I am using ext.kotlin_version = '1.9.21'

build.gradle:

plugins { id "com.android.application" id "kotlin-android" id "dev.flutter.flutter-gradle-plugin" // id 'com.google.gms.google-services' version '4.4.0' apply false }

def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { localPropertiesFile.withReader('UTF-8') { reader -> localProperties.load(reader) } }

def flutterVersionCode = localProperties.getProperty('flutter.versionCode') if (flutterVersionCode == null) { flutterVersionCode = '1' }

def flutterVersionName = localProperties.getProperty('flutter.versionName') if (flutterVersionName == null) { flutterVersionName = '1.0' }

android { namespace "com.example.spinner_try" compileSdkVersion flutter.compileSdkVersion ndkVersion flutter.ndkVersion

compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
    jvmTarget = '1.8'
}

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

defaultConfig {
    // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
    applicationId "com.example.spinner_try"
    // You can update the following values to match your application needs.
    // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
    minSdkVersion 21
    targetSdkVersion flutter.targetSdkVersion
    versionCode flutterVersionCode.toInteger()
    versionName flutterVersionName
}

buildTypes {
    release {
        // TODO: Add your own signing config for the release build.
        // Signing with the debug keys for now, so `flutter run --release` works.
        signingConfig signingConfigs.debug
    }
}

}

flutter { source '../..' }

dependencies { implementation 'com.facebook.android:facebook-login:latest.release' implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation platform('com.google.firebase:firebase-bom:32.7.0') }

image

raman04-byte commented 10 months ago

I have also tried to update the compileOptions and kotlinOptions like this:

compileOptions { sourceCompatibility JavaVersion.VERSION_17 targetCompatibility JavaVersion.VERSION_17 }

kotlinOptions {
    jvmTarget = '17'
}

But same error persists
raman04-byte commented 10 months ago

The error is solved as I was using way too high kotlin version which shouldn't be use current kotlin version: ext.kotlin_version = '1.7.10'