tapsellorg / TapsellPlusSDK-FlutterPlugin

Other
6 stars 2 forks source link

Failed to transform room-common-2.2.5.jar🐛  باگ: #19

Closed sayedReza closed 10 months ago

sayedReza commented 11 months ago
**شرح باگ در پلاگین**: مدتیه که وقتی میخوام از تپسل توی پروژه هام استفاده کنم به ارور میخورم با ارتقا گریدل و ورژن کاتلین و خیلی از راه های دیگه ای که رفتم حل نشد توی پروژه های قبلی تصمیم گرفتم که از تپسل استفاده نکنم ولی الان برای پروژه جدید دنبال راه حلش میگردم **متن کامل خطا یا لاگ مرتبط به طور کامل**: ``` FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:checkDebugDuplicateClasses'. > Could not resolve all files for configuration ':app:debugRuntimeClasspath'. > Failed to transform room-common-2.2.5.jar (androidx.room:room-common:2.2.5) to match attributes {artifactType=enumerated-runtime-classes, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime}. > Execution failed for EnumerateClassesTransform: C:\Users\IranzaminDevs\.gradle\caches\modules-2\files-2.1\androidx.room\room-common\2.2.5\f5e3b73a0c2ab5e276e26868e4ce3542baede207\room-common-2.2.5.jar. > zip END header not found * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 28s Exception: Gradle task assembleDebug failed with exit code 1 ``` **نحوه‌ی تولید مجدد آن توسط تیم توسعه**: من فقط با اضافه کردن افزونه به پروژه به این مشکل میخورمک **پکیج نیم برنامه‌**: `` ir.iranzamindevs.quit_smoking **اطلاعات اضافی که به حل مشکل کمک می‌کنند**: ``` buildscript { ext.kotlin_version = '1.8.20' repositories { google() mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:7.3.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } allprojects { repositories { google() mavenCentral() } } rootProject.buildDir = '../build' subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } subprojects { project.evaluationDependsOn(':app') } tasks.register("clean", Delete) { delete rootProject.buildDir } ``` ``` def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { localPropertiesFile.withReader('UTF-8') { reader -> localProperties.load(reader) } } def flutterRoot = localProperties.getProperty('flutter.sdk') if (flutterRoot == null) { throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") } def flutterVersionCode = localProperties.getProperty('flutter.versionCode') if (flutterVersionCode == null) { flutterVersionCode = '1' } def flutterVersionName = localProperties.getProperty('flutter.versionName') if (flutterVersionName == null) { flutterVersionName = '1.0' } apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { namespace "ir.iranzamindevs.quit_smoking" 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 "ir.iranzamindevs.quit_smoking" // 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 19 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 "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" } ```
MortezaNedaei commented 10 months ago
sayedReza commented 10 months ago

مرسی با راه حلی که ارائه دادید درست شد