After import from Eclipse to Android Studio cannot run Execution failed for task ':app:dexDebug"

后端 未结 2 878
灰色年华
灰色年华 2021-01-02 11:38

Have an Android project working in Eclipse (4.4.2) ADT, running on Linux (Ubuntu 14.10).

I have imported to Android Studio (1.1.0) and managed to get rid of my initi

相关标签:
2条回答
  • 2021-01-02 12:03

    Aha!

    Seems the answer was further up in trace: The error was

    com.android.dex.DexException: Multiple dex files define Lcom/nineoldandroids/animation/Animator$AnimatorListener;

    So I found the answer here:

    ListViewAnimations Library Causes TOP-LEVEL-EXCEPTION

    Part of the trick is not only to add the line to build.gradle saying

    compile files('libs/nineoldandroids-2.4.0.jar')
    

    but also to remove the JAR from the libs directory.

    Now I have more linking issues but I'll leave them for another question I guess.

    0 讨论(0)
  • 2021-01-02 12:16

    Sometimes, you would have to remove android libraries which you have in libs folder while you were working in EclipseADT. I recommend to remove android-support-v*.jar from the libs folder after importing it to the Android Studio Directory.

    0 讨论(0)
提交回复
热议问题