• 05-06-2022, 14:07:31
    #1
    Arkadaşlar merhaba. debug.apk sorunsuz alabiliyorum fakar release alırken aşağıdaki hatayı alıyorum. Kotlin versiyon 1.5.10

    Denemelerim;
    - Gradle versiyon yükseltme/düşürme
    - Kotlin versiyon yükseltme ( cache ve . Gradle silerek işlem yaptim)
    Bu hatayi çözemiyorum. Başına gelen veya tecrübeli arkadaşlar yardımcı olursa sevinirim.

    jetified-kotlin-reflect-1.5.10.jar:meta-inf/versions/9/kotlin/reflect/jvm/internal/impl/serialization/deserialization/builtins/builtinsresourceloader.class

    app gradle dosyam bu şekildedir.
    apply plugin: 'com.android.application'
    apply plugin: 'kotlin-android'
    apply plugin: 'kotlin-android-extensions'
    
    android {
    compileSdkVersion Integer.parseInt("$compileSdkVer")
    
    compileOptions {
    targetCompatibility = "8"
    sourceCompatibility = "8"
    }
    
    defaultConfig {
    applicationId "com.like.mike"
    minSdkVersion 21
    vectorDrawables.useSupportLibrary = true
    targetSdkVersion Integer.parseInt("$targetSdkVer")
    multiDexEnabled true
    versionCode 212
    versionName "1.0.2"
    }
    
    buildTypes {
    release {
    debuggable false
    minifyEnabled true
    zipAlignEnabled false
    shrinkResources true
    proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
    
    debug {
    minifyEnabled false
    zipAlignEnabled false
    shrinkResources false
    ndk.abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a'
    }
    }
    
    sourceSets {
    main.java.srcDirs += 'src/main/kotlin'
    }
    
    kotlinOptions {
    jvmTarget = JavaVersion.VERSION_1_8
    }
    
    // map for the version code
    project.ext.versionCodes = ['armeabi-v7a': 1, 'arm64-v8a': 2, 'x86': 3, 'x86_64': 4]
    
    android.applicationVariants.all { variant ->
    // assign different version code for each output
    variant.outputs.each { output ->
    output.versionCodeOverride =
    project.ext.versionCodes.get(output.getFilter(com.android.build.OutputFile.ABI), 0) *
    1000000 + android.defaultConfig.versionCode
    }
    }
    
    buildFeatures {
    viewBinding true
    }
    }
    
    repositories {
    maven { url "https://jitpack.io" }
    }
    
    dependencies {
    implementation fileTree(dir: 'libs', include: ['*.aar', '*.jar'], exclude: [])
    testImplementation 'junit:junit:4.13'
    
    // Androidx
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    implementation "androidx.legacy:legacy-support-v4:1.0.0"
    implementation "androidx.appcompat:appcompat:1.3.0"
    implementation "com.google.android.material:material:1.4.0"
    implementation "androidx.cardview:cardview:1.0.0"
    implementation "androidx.preference:preference:1.0.0"
    implementation "androidx.recyclerview:recyclerview:1.2.1"
    implementation 'androidx.multidex:multidex:2.0.1'
    implementation 'androidx.viewpager2:viewpager2:1.1.0-beta01'
    
    // Androidx ktx
    implementation 'androidx.activity:activity-ktx:1.2.4'
    implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
    implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
    
    //kotlin
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion"
    implementation "org.jetbrains.kotlin:kotlin-reflect:$kotlinVersion"
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.4.1"
    implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.1"
    
    implementation 'com.tencent:mmkv-static:1.2.7'
    implementation 'com.google.code.gson:gson:2.8.6'
    implementation 'io.reactivex:rxjava:1.3.4'
    implementation 'io.reactivex:rxandroid:1.2.1'
    implementation 'com.tbruyelle.rxpermissions:rxpermissions:0.9.4@aar'
    implementation 'me.dm7.barcodescanner:core:1.9.8'
    implementation 'me.dm7.barcodescanner:zxing:1.9.8'
    implementation 'com.github.jorgecastilloprz:fabprogresscircle:1.01@aar'
    implementation 'me.drakeet.support:toastcompat:1.1.0'
    implementation 'com.blacksquircle.ui:editorkit:2.0.0'
    implementation 'com.blacksquircle.ui:language-json:2.0.0'
    
    implementation 'com.android.volley:volley:1.2.1'
    implementation 'com.google.code.gson:gson:2.8.9'
    implementation 'com.android.billingclient:billing-ktx:4.1.0'
    implementation 'com.github.bumptech.glide:glide:4.12.0'
    implementation project(':Country_Selecter')
    implementation 'com.intuit.sdp:sdp-android:1.0.6'
    implementation 'io.reactivex.rxjava2:rxjava:2.2.10'
    implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
    implementation 'com.github.oatrice:internet-speed-testing:1.0.1'
    
    implementation 'com.google.android.gms:play-services-ads:20.6.0'
    implementation "com.utsman.recycling:recycling:1.3.8"
    implementation project(':nativetemplates')
    // implementation 'net.idik:slimadapter:2.1.2'
    }
    
    buildscript {
    repositories {
    google()
    jcenter()
    maven { url 'https://maven.google.com' }
    }
    dependencies {
    classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlinVersion"
    }
    }
  • 05-06-2022, 17:18:17
    #2
    Hata görseli paylaşırsan daha iyi olur
  • 06-06-2022, 11:51:10
    #3
    WebilisimNET adlı üyeden alıntı: mesajı görüntüle
    Hata görseli paylaşırsan daha iyi olur
    İlgin için teşekkür ederim. Problemi r8, minify kapatarak çözdüm. Boyut çok arttı ama sorun çözüldü.
  • 06-06-2022, 12:35:25
    #4
    Misafir adlı üyeden alıntı: mesajı görüntüle
    İlgin için teşekkür ederim. Problemi r8, minify kapatarak çözdüm. Boyut çok arttı ama sorun çözüldü.
    Minify aktif etti isen gradle.properties kısmına şunu girmen yeterli:

    android.enableR8=true
    android.useAndroidX=true
    android.enableJetifier=true
  • 06-06-2022, 18:17:18
    #5

    Proje dizini içerisindeki build.gradle dosyasına en alttaki kotlin kitaplığını ekle


    Daha sonra app klasörü içindeki build.gradle dosyasında plugins kısmındaki en alttaki kotlin kitaplığını ekle



    Bunları eklerken diğer kotlin uzantılarını kaldır, build.gradle dosyanın dependencies kısmında jetbrains kotlin kitaplığını kaldır.