Android Dex: UNEXPECTED TOP-LEVEL EXCEPTION: Already added

后端 未结 6 2422
傲寒
傲寒 2020-12-10 10:06

My app depends on a library project. This library project depends on the Android Compatibility Package V4. I have NOT exported the library project\'s depend

6条回答
  •  感情败类
    2020-12-10 10:41

    Well, in my story I had to delete module dependencies which were the same, add it in library, and then add this library to each module as a dependence.

    So:

    • Module a : Depends on android-v4 (and has it in it's lib folder)
    • Module b : Depends on android-v4 (and has it in it's lib folder)

      1. Add to libraries of project "android-v4" (for ex from 1st module). Delete it in module b lib folder.

      2. Delete in modules a and b dependence of android-v4

      3. Add to each module dependence -> library -> android-v4 (which you created in 2 step)

    I'm not sure if it is the right solution but it works.

提交回复
热议问题