的IntelliJ 12 + ActionBarSherlock setttings:找不到类的android.support.v4.app.FragmentActivity“ [英] IntelliJ 12 + ActionBarSherlock setttings: Could not find class 'android.support.v4.app.FragmentActivity'
问题描述
有无数的Q&安培; A约的IntelliJ 12 + ABS(ActionBarSherlock)设置
There are numerous Q&A about IntelliJ 12 + ABS(ActionBarSherlock) settings.
相似的情况下,以<一href="http://stackoverflow.com/questions/14099291/intellij-android-support-v4-jar-in-included-in-actionbarsherlock-and-project">this问题但显示不同的错误。
similar case to this question but shows different errors.
综合编译和奔跑都用标签导航( SherlockActivity实现ActionBar.TabListener
)提供了以下错误和崩溃OK,但唯一的活动。
请注意,我可以使用一般的 SherlockActivity
显示良好。
Overall compilation and runnings are OK but only Activity using Tab Navigation(SherlockActivity implements ActionBar.TabListener
) gives following error and crash.
Note that I can use general SherlockActivity
shows well.
找不到类android.support.v4.app.FragmentActivity,从法com.actionbarsherlock.internal.app.ActionBarWrapper $ TabWrapper.onTabReselected引用每个重写的方法( onTabUnselected
, onTabSelected
, onTabReselected
)。
"Could not find class 'android.support.v4.app.FragmentActivity', referenced from method com.actionbarsherlock.internal.app.ActionBarWrapper$TabWrapper.onTabReselected" on every overriden methods (onTabUnselected
, onTabSelected
, onTabReselected
).
这似乎是Android的支持-V4没有成功地引用,但很难找到选中/清除试验和错误。
It seems like android-support-v4 is not sucessfully referenced but hard to find with check/uncheck trial-and-errors.
我的IntelliJ项目设置如下所示。
My IntelliJ project settings are as below.
1。图书馆是ABS库文件夹的名称。
1. Library is a name of ABS library folder.
2。我的项目设置。
2. My project settings.
我同时设置的android支持-V4到的提供的的。 我可以做更多?
I set both android-support-v4 to provided. What can I do more?
有人回答说删除Android的支持-V4 ,以我自己的项目,但它显示了进口android.support.v4.app.FragmentTransaction引用错误
,因为实现ActionBar.TabListener
需要它。
Some answers said to remove android-support-v4 to my own project but it shows reference errors on import android.support.v4.app.FragmentTransaction
because implements ActionBar.TabListener
requires it.
推荐答案
这个配置不正确, Android的支持-V4
库的范围必须设置为编译,因为它不是在Android present,必须包含在你的应用程序。
This configuration is not correct, the scope of the android-support-v4
library must be set to Compile as it's not present on Android and must be included in your application.
的第二个副本 Android的支持-V4
必须从应用程序的依赖删除,它会通过有导出<库模块提供给您的应用程序/ STRONG>启用 Android的支持-V4
。
Second copy of android-support-v4
must be removed from the application dependencies, it will be available to your application via a library module that has Export option enabled for android-support-v4
.
这篇关于的IntelliJ 12 + ActionBarSherlock setttings:找不到类的android.support.v4.app.FragmentActivity“的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!