- Home /
More than one file was found with OS independent path 'kotlin/reflect/reflect.kotlin_builtins'
I was trying to create Android build after exporting from Unity Project. When I tried to export signed APK file, I got many errors and step by step , I have cleared all others.
But at present, get stuck on this one : 
This is my Gradle file content :
// GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
}
}
allprojects {
repositories {
flatDir {
dirs 'libs'
}
google()
}
}
apply plugin: 'com.android.application'
dependencies {
compile 'com.android.support:multidex:1.0.2'
compile fileTree(dir: 'libs', include: ['*.jar'])
compile(name: 'GoogleAIDL', ext:'aar')
compile(name: 'GooglePlay', ext:'aar')
compile(name: 'android.arch.lifecycle.runtime-1.0.0', ext:'aar')
compile(name: 'com.android.support.animated-vector-drawable-26.1.0', ext:'aar')
compile(name: 'com.android.support.appcompat-v7-26.1.0', ext:'aar')
compile(name: 'com.android.support.cardview-v7-26.1.0', ext:'aar')
compile(name: 'com.android.support.customtabs-26.1.0', ext:'aar')
compile(name: 'com.android.support.support-compat-26.1.0', ext:'aar')
compile(name: 'com.android.support.support-core-ui-26.1.0', ext:'aar')
compile(name: 'com.android.support.support-core-utils-26.1.0', ext:'aar')
compile(name: 'com.android.support.support-fragment-26.1.0', ext:'aar')
compile(name: 'com.android.support.support-media-compat-26.1.0', ext:'aar')
compile(name: 'com.android.support.support-v4-26.1.0', ext:'aar')
compile(name: 'com.android.support.support-vector-drawable-26.1.0', ext:'aar')
compile(name: 'com.google.android.gms.play-services-auth-16.0.0', ext:'aar')
compile(name: 'com.google.android.gms.play-services-auth-api-phone-15.0.1', ext:'aar')
compile(name: 'com.google.android.gms.play-services-auth-base-15.1.0', ext:'aar')
compile(name: 'com.google.android.gms.play-services-base-15.0.1', ext:'aar')
compile(name: 'com.google.android.gms.play-services-basement-15.0.1', ext:'aar')
compile(name: 'com.google.android.gms.play-services-tasks-15.0.1', ext:'aar')
compile(name: 'com.google.signin.google-signin-support-1.0.3', ext:'aar')
compile(name: 'common', ext:'aar')
compile(name: 'facebook-android-wrapper-7.12.1', ext:'aar')
compile(name: 'facebook-applinks', ext:'aar')
compile(name: 'facebook-common', ext:'aar')
compile(name: 'facebook-core', ext:'aar')
compile(name: 'facebook-login', ext:'aar')
compile(name: 'facebook-messenger', ext:'aar')
compile(name: 'facebook-places', ext:'aar')
compile(name: 'facebook-share', ext:'aar')
compile group: 'com.android.tools.lint', name: 'lint-gradle', version: '26.1.0-beta1'
}
android {
compileSdkVersion 28
buildToolsVersion '28.0.2'
defaultConfig {
targetSdkVersion 28
applicationId 'com.newdodgels'
multiDexEnabled true
}
lintOptions {
abortOnError false
}
aaptOptions {
noCompress '.unity3d', '.ress', '.resource', '.obb','bin/data/sharedassets0.resource'
}
signingConfigs { release {
storeFile file('/Volumes/Work/Company/Unity/RunningGames/Dodgels/market/dodgelskeystore.keystore')
storePassword 'Dodgels2018'
keyAlias 'dodgels'
keyPassword 'Dodgels2018'
} }
buildTypes {
debug {
minifyEnabled false
useProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt'
jniDebuggable true
}
release {
minifyEnabled true
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt'
signingConfig signingConfigs.release
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
}
}
I have tried Stackoverflow posts with similar problems. So I expect some other solution that work for me.
Answer by timjamesfraser · Jan 18, 2019 at 03:03 PM
Hi @siddharth3322. Did you find a solution to this? I'm struggling with exactly the same thing on an Android Kotlin build at the moment. Would be great to know if you worked out a fix. Thanks.
No, I can't - I spent enough time with this problem but I don't have enough knowledge in Android so I can't able to sort out this problem. I have changed this approach to build export after that.
Thanks for getting back to me but I just found a solution to my prob:
So I added the following to my Gradle build:
packagingOptions { exclude "/$$anonymous$$ETA-INF/.kotlin_module" exclude "/kotlin/*" }
Hope that helps if you face the problem again in the future. Cheers
Your answer