天天看點

eclipse中Build Path-Add to Build Path相應到androidstudio的設定

有些時候并不須要加入lib庫進行編譯,比如在使用xposed的jar包時,僅僅須要在eclipse裡Build Path-Add to Build Path就可以,假設作為lib庫加入進去反而會出現異常。

下面是引用的原文:

--------------------------------------

Next, make the XposedBridge API known to the project. You can download

XposedBridgeApi-<version>.jar

 from the first post of this XDA thread. Copy it into a subfolder called 

lib

. Then right-click on it and select Build Path => Add to Build Path. The 

<version>

 from the file name is the one you insert as

xposedminversion

 in the manifest.

Make sure that the API classes are not included (but only referenced) in your compiled APK, otherwise you will get an 

IllegalAccessError

. Files in the

libs

 (with "s") folder are automatically included by Eclipse, so don't put the API file there.

--------------------------------------

在androidstudio相應的設定方法為:

F4打開project結構,選擇Modules-目前項目-Dependencies-+-選擇“Jar or directiories”。

eclipse中Build Path-Add to Build Path相應到androidstudio的設定

選擇jar包後,在“Scope”欄選擇“Provided”,不要選擇“Complie”。

eclipse中Build Path-Add to Build Path相應到androidstudio的設定