Exclude one class file in gradle Android Studio

前端 未结 2 2038
你的背包
你的背包 2020-12-17 06:05

In my projects, I need to import third party jar file and Facebook SDK.

compile files(\'libs/SkinSDK.jar\')
compile \'com.facebook.android:facebook-android-         


        
2条回答
  •  心在旅途
    2020-12-17 06:39

    Bumped into similar situation. This is what I did, not elegant as I hoped, but it works:

    1. Rename the jar file (SkinSDK.jar in your case): .zip instead of .jar

    2. Go "inside" the zip file (I'm using DoubleCommander, there are many other utilities for that), or extract it to a temporary folder.

    3. Delete the duplicate class that causes the problem. Go "outside" the zip file.

    4. Rename (or re-pack) the file from .zip to .jar . Compile.

    Hope it works...

提交回复
热议问题