487

I want to add fused location services but it shows me some error. Help me.

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "27.0.1"
    defaultConfig {
        applicationId "com.example.adil.bloodbankapplication"
        minSdkVersion 15
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:26.1.0'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.google.firebase:firebase-auth:11.8.0'
    compile 'com.google.firebase:firebase-database:11.8.0'
    compile 'com.android.support:support-v4:26.1.0'
    compile 'junit:junit:4.12'
    compile 'com.android.support:design:26.1.0'
    compile 'com.github.joielechong:countrycodepicker:2.1.5'
    compile 'com.jaredrummler:material-spinner:1.2.4'
    compile 'hanks.xyz:htextview-library:0.1.5'
    compile 'com.firebaseui:firebase-ui-database:1.2.0'
    compile 'com.google.android.gms:play-services:11.8.0'
}


apply plugin: 'com.google.gms.google-services'
Tom11
  • 2,419
  • 8
  • 30
  • 56
Muhammad Adil Sattar
  • 4,871
  • 2
  • 9
  • 6

32 Answers32

626

None of the answers they gave you was exhaustive. The problem lies in the Multidex. You must add the library in the app gradle :

implementation 'com.android.support:multidex:1.0.3'

After, add in the defaultConfig of the app gradle :

multiDexEnabled true

Your Application must be of the Multidex type.. You must write it in the manifest :

android:name=".MyApplication"

"MyApplication" must be either the Multidex class, or it must extend it.

sspiel
  • 3
  • 2
AlexPad
  • 10,364
  • 3
  • 38
  • 48
  • 8
    So `MyApplication extends android.support.multidex.MultiDexApplication` ? – ban-geoengineering Apr 18 '18 at 00:26
  • 2
    I have tried this solution, but I end up with this new problem: https://stackoverflow.com/questions/49518115/android-studio-3-1-warning-the-rule-keep-public-class-extends-java-lang-anno?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa – ban-geoengineering Apr 18 '18 at 00:27
  • @ban-geoengineering Yes, you can extend the MultidexApplication :) – AlexPad Apr 19 '18 at 12:12
  • 33
    Here's the official android doc page providing more explanations on the why this happens and how to make a better release-version apk: https://developer.android.com/studio/build/multidex – Vrakfall Jun 04 '18 at 16:11
  • 2
    it's not a good method to solve the issue, better to remove unused code and libraries, refactor your project code – user25 Jan 13 '19 at 15:49
  • You should avoid multidex at all if possible. Please see my answer below. – MG Developer Jun 07 '19 at 03:23
  • It is not really true. You can't afford not to create some extra abstraction just because you should be careful not to be able to use it. On medium-large projects this consideration is not good – AlexPad Jun 07 '19 at 08:14
  • 1
    @user25 Why is this not a good solution what are side effects we may not know from using multiDex ? – isJulian00 Jun 21 '19 at 22:44
  • 2
    This works with `minSdkVersion 21` even without the `MyApplication` thing – Rami Alloush Oct 09 '19 at 21:10
  • 19
    not having 80000 methods would be a fine solution if googles libraries didn't have 80000 methods(whole reason why they added multidex was because their own services library they wanted everyone to use had tens of thousands of methods). – Lassi Kinnunen Oct 21 '19 at 17:24
  • 1
    for androidx add: implementation 'androidx.multidex:multidex:2.0.1 – Guy Sadoun Apr 18 '20 at 13:27
  • 6
    if your minSdkVersion is 21 or higher, the multidex support library is not needed. – abhijat_saxena Oct 17 '20 at 13:22
  • I used minSdkVersion 19 and then use Android Studio Emulator API 19 runs cannot run google Ads and then use Emulator API 22 will have Build Output saying Cannot fit requested classes in a single dex file (# methods: 87528 > 65536) . Using Emulator API 29/33 has not problem. Why will the emulator API 22 cannot even build when I changed the AppSingleton to MultiDexApplication ? I have already enable MutliDex in gradle and add the dependency. – Raii Jan 21 '23 at 09:20
  • I give up and changed minSdkVersion from 19 to 21 and retry. Then the Emulator Pixel 4 API 22 can build and debug properly. I dont know if it is emulator problem as I dont have an API 22 mobile to test. – Raii Jan 21 '23 at 09:40
297

I fixed my problem with the solution below:

In Gradle build file, add dependency:

implementation 'com.android.support:multidex:1.0.3'

And then in the "defaultConfig" section, add:

multiDexEnabled true

Bofeng
  • 3,174
  • 1
  • 8
  • 6
  • 12
    Worked for me. Detailed instructions on configuration here: https://developer.android.com/studio/build/multidex#mdex-gradle – Alex Burdusel May 01 '18 at 14:03
  • 1
    Enabling multidex support is not necessary in most applications. You should consider removing the unused libraries, please see my answer below. – MG Developer Jun 07 '19 at 12:02
  • I wanted to avoid multidex in my react-native app by reducing the number of methods, so I used https://github.com/mihaip/dex-method-counts to measure them. Turns out facebook's methods alone are 27k+, but I must have Fb, etc almost no method count is my code, so multidex is a must – Darko Maksimovic Oct 26 '20 at 07:11
  • implementation 'com.android.support:multidex:2.0.1' – b.lopes Mar 23 '23 at 23:24
161

modify your app's or module's build.gradle

android {
    defaultConfig {
        ...
        minSdkVersion 21 <----- *here
        targetSdkVersion 26
        multiDexEnabled true <------ *here
    }
    ...
}

According to official documentation

Multidex support for Android 5.0 and higher

Android 5.0 (API level 21) and higher uses a runtime called ART which natively supports loading multiple DEX files from APK files. ART performs pre-compilation at app install time which scans for classesN.dex files and compiles them into a single .oat file for execution by the Android device. Therefore, if your minSdkVersion is 21 or higher, you do not need the multidex support library.

For more information on the Android 5.0 runtime, read ART and Dalvik.

https://developer.android.com/studio/build/multidex

Community
  • 1
  • 1
wdanxna
  • 10,699
  • 2
  • 23
  • 24
94

What are dex files: Android app (APK) files contain executable bytecode files in the form of Dalvik Executable (DEX) files, which contain the compiled code used to run your app.

Reason for this exception: The DEX specification limits the total number of methods that can be referenced within a single DEX file to 65,536 (64K reference limit) —including Android framework methods, library methods, and methods in your own code.

Step 01. Add the following dependency as follows

For Non-Androidx Users,

dependencies {
  implementation 'com.android.support:multidex:1.0.3'
}
defaultConfig {
    minSdkVersion 16
    targetSdkVersion 28
    multiDexEnabled true  //ADD THIS LINE
}

For Androidx Users,

dependencies {
  implementation 'androidx.multidex:multidex:2.0.1'
}
    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 28
        multiDexEnabled true  //ADD THIS LINE
    }

Step 02:

After adding those Sync projects and before you run the project make sure to Build a project before the run. otherwise, you will get an exception.

gsm
  • 2,348
  • 17
  • 16
60

You can follow this.

Versions of the platform prior to Android 5.0 (API level 21) use the Dalvik runtime for executing app code. By default, Dalvik limits apps to a single classes.dex bytecode file per APK. In order to get around this limitation, you can add the multidex support library to your project:

dependencies {
  implementation 'com.android.support:multidex:1.0.3'
}

If your minSdkVersion is set to 21 or higher, all you need to do is set multiDexEnabled to true in your module-level build.gradle file, as shown here:

android {
    defaultConfig {
        ...
        minSdkVersion 21 
        targetSdkVersion 28
        multiDexEnabled true
    }
    ...
}
rize
  • 1,104
  • 8
  • 9
  • This works for me. Just multiDexEnabled + dependency (without class extending as in other answers). Also works for minSdkVersion 16. – mikep Apr 13 '23 at 14:09
45

when you are using dependencies so your methods increased! google has a solution for that. that called Multidex!

NOTE: be sure that min SDK is over 14.

in your build.gradle :

android {
    defaultConfig {
        ...
        minSdkVersion 15 
        targetSdkVersion 28
        multiDexEnabled true
    }
    ...
}



  dependencies {
      implementation 'com.android.support:multidex:1.0.3'
    }

FOR androidX USE :

 def multidex_version = "2.0.1"
 implementation 'androidx.multidex:multidex:$multidex_version'

For more information please go to the orginal link :

https://developer.android.com/studio/build/multidex

intraector
  • 994
  • 10
  • 20
Sana Ebadi
  • 6,656
  • 2
  • 44
  • 44
36

Hi problem is here remove it

compile 'com.google.android.gms:play-services:11.8.0'

why?

Note: Don't use the combined play-services target. It brings in dozens of libraries, bloating your application. Instead, specify only the specific Google Play services APIs your app uses.

And use what you need.https://developers.google.com/android/guides/setup

Like for location service

com.google.android.gms:play-services-location:11.8.0

For Cloud Messaging

com.google.android.gms:play-services-gcm:11.8.0
Arash Hatami
  • 5,297
  • 5
  • 39
  • 59
Pankaj Kant Patel
  • 2,050
  • 21
  • 27
36

I used below solution in my Flutter project:

Open yourproject/app/build.gradle and add the following lines:

android {
    ...

    defaultConfig {
        ...
        
        minSdkVersion 21
        multiDexEnabled true
    }
}

then

dependencies {
    ...

    implementation 'com.android.support:multidex:1.0.3'
}

If you have migrated to AndroidX, you will want this instead:

dependencies {
    ...

    implementation 'androidx.multidex:multidex:2.0.1'
}

This solution worked for me. Thank you for asking this question.

Kamlesh
  • 5,233
  • 39
  • 50
31

If you are building DEBUG APK, just add:

debug {
            multiDexEnabled true
        }

inside buildTypes

and if you are building RELEASE APK, add multiDexEnabled true in release block as-

release {
                ...
                multiDexEnabled true
                ...
        }
Raj Yadav
  • 9,677
  • 6
  • 35
  • 30
  • Open project/app/build.gradle and add the following lines. defaultConfig { ... multiDexEnabled true } – Kamlesh Jun 14 '21 at 09:10
27

For flutter projects you can also solve this issue

open your \android\app\build.gradle

you sould have the following:

android {
    defaultConfig {
        ...
        minSdkVersion 16
        targetSdkVersion 28

    }

}

If your minSdkVersion is set to 21 or higher, all you need to do is set multiDexEnabled to true in the defaultConfig. Like this

android {
    defaultConfig {
        ...
        minSdkVersion 16
        targetSdkVersion 28
        multiDexEnabled true 

    }

}

if your minSdkVersion is set to 20 or lower add multiDexEnabled true to the defaultConfig

And define the implementation

dependencies {
  implementation 'com.android.support:multidex:1.0.3'// or 2.0.1
}

At the end you should have:

android {
    defaultConfig {
        ...
        minSdkVersion 16
        targetSdkVersion 28
        multiDexEnabled true  // added this
    }

}

dependencies {
  implementation 'com.android.support:multidex:1.0.3'
}

For more information read this: https://developer.android.com/studio/build/multidex

Valeriy
  • 191
  • 2
  • 10
Richardd
  • 956
  • 14
  • 27
24

I solved my same problem like this way, you need to follow 2 simple step. I'm AndroidX user so for me, first I implement this dependencies in build.gradle file in my project in dependencies section.

implementation 'androidx.multidex:multidex:2.0.1'

dependencies {
//for multidex
implementation 'androidx.multidex:multidex:2.0.1'

}

after add this dependencies in your build.gradle file then sync your project again

Now add in the "defaultConfig" section:

multiDexEnabled true

defaultConfig {
    applicationId "com.papel.helper"
    minSdkVersion 16
    targetSdkVersion 28
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

    multiDexEnabled true
  
}

Now Rebuild your project again and Run :)

Papel
  • 541
  • 4
  • 7
19

Just do the following:

build.gradle

(module:app)


android {
            ....
      defaultConfig {
              multiDexEnabled true // enable mun
      }
}

And add below dependency in your build.gradle app level file

dependencies {
    implementation 'com.android.support:multidex:1.0.3'
} 
Al-Amin
  • 1,369
  • 1
  • 9
  • 26
Saif Khan
  • 191
  • 1
  • 2
19

I found this solution for my project
I just set the minimum SDK version to 21 and that solves my problem

android {
    defaultConfig {
        ...
        minSdkVersion 21 //set the minimum sdk version 21
        targetSdkVersion 29
    }
    ...
}

if your minSdkVersion is 21 or higher multidex is enabled by default, and you do not need the multidex support library. To read more about multidex https://developer.android.com/studio/build/multidex.html

Mostasim Billah
  • 4,447
  • 3
  • 19
  • 28
17

In Gradle build file, add dependency:

implementation 'com.android.support:multidex:1.0.2'

or

implementation 'com.android.support:multidex:1.0.3'

or

implementation 'com.android.support:multidex:2.0.0'

And then in the "defaultConfig" section, add:

multiDexEnabled true

Under targetSdkVersion

minSdkVersion 17
targetSdkVersion 27
multiDexEnabled true

Now if you encounter this error

Error:Failed to resolve: multidex-instrumentation Open File

You need to change your gradle to 3.0.1

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

And put the following code in the file gradle-wrapper.properties

distributionUrl=https://services.gradle.org/distributions/gradle-4.1-all.zip

Finally

add class Applition in project And introduce it to the AndroidManifest Which is extends from MultiDexApplication

public class App extends MultiDexApplication {

    @Override
    public void onCreate( ) {
        super.onCreate( );
    }
}

Run the project first to create an error, then clean the project

Finally, Re-launch the project and enjoy it

younes
  • 742
  • 7
  • 8
17

Just add this code in your app's or module's build.gradle

android {
    defaultConfig {
        ...
        
        multiDexEnabled true <------ * here
    }
    ...
}
lookly Dev
  • 325
  • 3
  • 5
14
multiDexEnabled true

Please try adding this in your app defaultConfig {}.This help me to solve the problem

Zoe
  • 27,060
  • 21
  • 118
  • 148
user2173696
  • 151
  • 1
  • 2
14

This will do the work either for Kotlin or Java project.

Step 1 - Locate build.gradle(Module:app) under the Gradle Scripts

Step 2 - add multiDexEnabled true see below:

    compileSdkVersion 29

    defaultConfig {
        applicationId "com.example.appname"
        minSdkVersion 19
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
        multiDexEnabled true //addded
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

Step 3 - add the multidex dependency

dependencies {
implementation 'com.android.support:multidex:2.0.0' //added
}

Finally, sync your project.. Enjoy!

Dayo Jaiye
  • 948
  • 1
  • 10
  • 17
13

If you are using minifyEnabled with Proguard, you likely won't need to enable multi-dex. I agree with MG Developer that you should try to avoid multi-dex if possible. My solution was to enable multi-dex only for debug builds. minifyEnabled solves the problem for release builds

buildTypes {
    release {
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
    debug {
        // getting error: Cannot fit requested classes in a single dex file.  # methods: 65537 > 65536
        // https://developer.android.com/studio/build/multidex
        // minifyEnabled true (used with release) will fix this by getting rid of unused method calls, but this will hide debugging info on crash
        multiDexEnabled true
    }
}
Ernie Thomason
  • 1,579
  • 17
  • 20
  • what are some of the drawbacks of using multidex if we have to ? – isJulian00 Jun 21 '19 at 22:54
  • 1
    Very good question, which I don't really have an answer to. Read the following if you haven't: at https://developer.android.com/studio/build/multidex#mdex-gradle It seems like for API >= 21, there's not much issue. For < 21, seems Android has to do some fancy footwork that could potentially have issues. Since many people do need to turn this on, my guess is that Android has got it working well, so I wouldn't worry about it too much. I just like to be conservative where possible. – Ernie Thomason Jun 24 '19 at 18:29
11
  1. Goto build.gradle of app folder,
  2. set minSdkVersion to 21

Save and Run your app, it should run without the dex error now

Phayrouz
  • 281
  • 3
  • 5
10

You have too many methods count. Android dex file has a limit of 65536 methods you are allowed to have.

For starters, if you don't need all of google play services API and just the location, replace

compile 'com.google.android.gms:play-services:11.8.0'

with

compile 'com.google.android.gms:play-services-location:11.8.0'

You can refer to this page for ways to avoid it or if needed to allow more: https://developer.android.com/studio/build/multidex.html

Raz
  • 8,918
  • 3
  • 27
  • 40
10

I have no idea why, maybe it is because I develop in Kotlin but to fix this error I finally have to create a class that extends MultiDexApplication like this:

class MyApplication : MultiDexApplication() {
}

and in my Manifest.xml I have to set

<application
        ...
        android:name=".MyApplication">

to not confuse anyone, I also do:

multiDexEnabled true
implementation 'com.android.support:multidex:1.0.3'

for androidx, this also works for me:

implementation 'androidx.multidex:multidex:2.0.0'

...

<application android:name="android.support.multidex.MultiDexApplication">

does not work for me

Boe-Dev
  • 1,585
  • 2
  • 14
  • 26
  • remember to do project clean and rebuild after setting multiDexEnabled true. This fixed it for me. – pseudozach Oct 19 '19 at 20:44
  • changing the application name attribute in the manifest didn't work for me either, but enabling multiDex in the gradle build file and adding the implementation did work. It seems that it's optional to change the manifest name tag now? – Cody May 12 '20 at 04:29
9

add your file android/app/build.gradle

 defaultConfig {
        applicationId "com.ubicacion"
        minSdkVersion rootProject.ext.minSdkVersion
        targetSdkVersion rootProject.ext.targetSdkVersion
        versionCode 1
        versionName "1.0"
        multiDexEnabled true // ✔
        missingDimensionStrategy 'react-native-camera', 'general'
    }
AN German
  • 725
  • 10
  • 10
6

All I had to do was set the Minimum SDK Version to 21 in File > Project Structure > App > Flavors

Will Buffington
  • 1,048
  • 11
  • 13
5

I have encountered this error twice and the solution for this is; Check you app gradle file to see your target SDk, if it is 20 or higher, just add one line to your defaultconfig { multiDexEnabled true }

Else if your targetSDK is less than 20, add the line to your defaultConfig and also add a dependency

implementation 'com.android.support:multidex:1.0.3'.

Check this link for more.

https://developer.android.com/studio/build/multidex#mdex-gradle

Sandeep Yohans
  • 929
  • 1
  • 14
  • 36
Mpwanyi Samuel
  • 178
  • 3
  • 7
5

Using multidex support should be the last resort. By default gradle build will collect a ton of transitive dependencies for your APK. As recommended in Google Developers Docs, first attempt to remove unnecessary dependencies from your project.

Using command line navigate to Android Projects Root. You can get the compile dependency tree as follows.

gradlew app:dependencies --configuration debugCompileClasspath

You can get full list of dependency tree

gradlew app:dependencies

enter image description here

Then remove the unnecessary or transitive dependencies from your app build.gradle. As an example if your app uses dependency called 'com.google.api-client' you can exclude the libraries/modules you do not need.

implementation ('com.google.api-client:google-api-client-android:1.28.0'){
   exclude group: 'org.apache.httpcomponents'
   exclude group: 'com.google.guava'
   exclude group: 'com.fasterxml.jackson.core'
   }

Then in Android Studio Select Build > Analyze APK... Select the release/debug APK file to see the contents. This will give you the methods and references count as follows.

Analyze APK

MG Developer
  • 859
  • 11
  • 17
2

In build:app

apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
    applicationId "com.proyecto.marketdillo"
    minSdkVersion 14
    targetSdkVersion 28
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    multiDexEnabled true
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }
  }
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0-rc02'
implementation 'com.google.firebase:firebase-core:16.0.7'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:support-v4:28.0.0-rc02'
implementation 'com.android.support:design:28.0.0-rc02'
implementation 'com.google.firebase:firebase-auth:16.1.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.firebase:firebase-firestore:17.1.5'
implementation 'com.android.support:multidex:1.0.3'
}
apply plugin: 'com.google.gms.google-services'
1
android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.dev.khamsat"
        minSdkVersion 16
        targetSdkVersion 28
        versionCode 1
        versionName "2.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }
Mohamed Slimane
  • 311
  • 3
  • 14
1

The error is caused by the number of class dependencies you have in your app Gradle file. If the classes exceed 72,400, you might want to use multidex as a solution to better handle file indexing. Findout more from here: https://developer.android.com/studio/build/multidex

Mpwanyi Samuel
  • 178
  • 3
  • 7
0

After suffering for two hours found the solution.

File path: android/build.gradle

Worked for me

defaultConfig {
    applicationId "com.something"
    minSdkVersion rootProject.ext.minSdkVersion
    targetSdkVersion rootProject.ext.targetSdkVersion
    versionCode 1
    versionName "1.0"
    multiDexEnabled true --> This works for me
}

If your minSdkVersion is set to 21 or higher, multidex is enabled by default and you do not need the multidex support library. - Reference : https://developer.android.com/studio/build/multidex#mdex-gradle

0

I know I am late for the answer, but, I am sure that this problem is caused by only a single dependency mostly, 'com.google.android.gms:play-services'. Please read the full answer for better understanding of problem, and solution.

In my case, I was using 'com.google.android.gms:play-services-location:21.0.1' which is the latest version of it, by the time I am writing this answer. It is having wayy too many method count. My only motive to use it was, for fetching location from user's device. Google recommends using play-services-location only for fetching location, so I did not want to replace this dependency for getting my work done. So, after numerous google searches, I found,

you can downgrade the version

to some previous stable version, to get your job done. And for my case, the best suited version for me came out to be 17.1.0. So I recommend you to use this specific version only, if your usecase to use play-services-location is exactly like mine.

Do these changes

implementation 'com.google.android.gms:play-services-location:21.0.1'

to

implementation 'com.google.android.gms:play-services-location:17.1.0'

Nonetheless, there is always option to enable multidexing in your code, but, that is the most inefficient way to solve this problem IMO.

If you can find the root cause of which dependency is maxing out your dex file size by large method count, then I guess you should tweak, or replace that dependency.

Divya Gupta
  • 494
  • 8
  • 24
0

If you use Dagger:

public class App extends DaggerApplication {

    @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base);
        MultiDex.install(this); //ADD MULTIDEX HERE!!!
    }

    @Override
    protected AndroidInjector<? extends DaggerApplication> applicationInjector() {
        return DaggerAppComponent.builder().application(this).build();
    }
}

In app build.gradle file:

android {
        defaultConfig {
            ...
            multiDexEnabled true
        }
    }
 ...
 implementation 'com.android.support:multidex:1.0.3'
Yuliia Ashomok
  • 8,336
  • 2
  • 60
  • 69
0

upgrade your minsdk version minSdk 24 or more..problem solved