Getting “Unable to execute dex: Multiple dex files define” error when trying to run main project which is using other library project

后端 未结 3 1042
半阙折子戏
半阙折子戏 2020-12-04 00:48

I am trying use androidVNC open source project as a Library Project in my MainProject. androidVNC has also used ZoomerWithKeys library project. I want start a activity of an

3条回答
  •  执笔经年
    2020-12-04 01:09

    I tackled with this kind error in Android Studio.

    In my case my main project was using two my own lib. But beside this those two libs were using the same library as external included
    compile files('lib/external-lib.jar')

    I solved it by doing following in my both own libs.

    1)Removing old compile files('lib/external-lib.jar' ) from build.gradle and deleting old external_lib.jar from lib folder.

    2)Adding library from jcenter() two my own libs
    compile 'external.lib:1.9.2'

    3)Rebuild.

    Then rebuild and run main project

    Then problem has disappeared.

提交回复
热议问题