更新时间:2022-12-31 10:50:32
我还在我的应用中使用了 PagerSlidingTabStrip
项目,一切正常.我不确定是否已经可以通过 IDE 添加一个库项目(-> 没有任何问题).请尝试通过像这样编辑 gradle 文件来添加库项目:
I also use the PagerSlidingTabStrip
Project in my app and everything works fine.
I'm not sure if it's already possible to add a library project via the IDE (-> without any problems).
Please try to add the library project by editing the gradle files like this:
PagerSlidingTabStrip
NewOne
) 中创建一个名为libs"的文件夹PagerSlidingTabStrip
项目的完整文件夹library"复制到libs"中现在使用以下命令将此库添加到您的 settings.gradle
中:
PagerSlidingTabStrip
NewOne
) named 'libs'PagerSlidingTabStrip
project on git into 'libs'now add this library in your settings.gradle
with the following command:
include ':libs:PagerSlidingTabStripLibrary'
转到您的 AppProject aps
的 build.gradle
文件,并将以下行添加到您的依赖项":
go to your build.gradle
file of your AppProject aps
and add the following line to your 'dependencies':
compile project(':libs:PagerSlidingTabStripLibrary')
至少你必须同步你的 gradle 文件:Tools -> Android -> Sync Project with Gradle Files
at least you have to sync your gradle files: Tools -> Android -> Sync Project with Gradle Files
请试试这个.如果出现错误,请发布日志文件.
Please try this. If you get errors please post the log file.