Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incompatibility with Google's AppCompat library #580

Open
vinaywadhwa opened this issue May 1, 2015 · 5 comments
Open

Incompatibility with Google's AppCompat library #580

vinaywadhwa opened this issue May 1, 2015 · 5 comments

Comments

@vinaywadhwa
Copy link

Hi,

  • I have been eyeing to use PageTurner in a closed-source app (after purchasing a license, of course).
  • The problem is i have many (~10) other library projects which my app is using, including google's AppCompatV7.
  • I converted PageTurner to a library module and added it as a dependency to my app.
  • I noticed that PageTurner uses ActionBarSherlock (which is now deprecated, btw. Any plans on refactoring and upgrading to google's appcompat?). The attributes in ActionBarSherlock's abs_attrs.xml file in the library conflicts with the attributes in attrs.xml of the AppCompatV7, due to which i cannot compile my project.
  • I have tried re-arranging dependencies, renaming attributes and a few other things but i couldn't come around to solve the problem.
  • I would be very disappointed if i can't use this library because of this lil problem. Have any of your users faced this problem before? Do you have any suggestions/solutions? Hope i was clear about the problem.

This is the kind of conflict errors i get when i build my project which refers(depends upon) to AppCompatV7 and PageTurner>(or any other library project which has ActionBarSherlock as a dependency)

Error:Attribute "titleTextStyle" has already been defined
Error:Attribute "subtitleTextStyle" has already been defined
Error:Attribute "divider" has already been defined
Error:Attribute "background" has already been defined
Error:Attribute "backgroundSplit" has already been defined
Error:Attribute "navigationMode" has already been defined
Error:Attribute "displayOptions" has already been defined
Error:Attribute "title" has already been defined
Error:Attribute "subtitle" has already been defined
Error:Attribute "icon" has already been defined
Error:Attribute "logo" has already been defined
Error:Attribute "backgroundStacked" has already been defined
Error:Attribute "customNavigationLayout" has already been defined
Error:Attribute "homeLayout" has already been defined
Error:Attribute "progressBarStyle" has already been defined
Error:Attribute "indeterminateProgressStyle" has already been defined
Error:Attribute "progressBarPadding" has already been defined
Error:Attribute "itemPadding" has already been defined
Error:Attribute "initialActivityCount" has already been defined
Error:Attribute "expandActivityOverflowButtonDrawable" has already been defined
Error:Attribute "preserveIconSpacing" has already been defined
Error:Attribute "iconifiedByDefault" has already been defined
Error:Attribute "queryHint" has already been defined
Error:Attribute "windowActionBar" has already been defined
Error:Attribute "windowActionBarOverlay" has already been defined
Error:Attribute "windowActionModeOverlay" has already been defined
Error:Attribute "actionBarTabStyle" has already been defined
Error:Attribute "actionBarTabBarStyle" has already been defined
Error:Attribute "actionBarTabTextStyle" has already been defined
Error:Attribute "actionOverflowButtonStyle" has already been defined
Error:Attribute "actionBarStyle" has already been defined
Error:Attribute "actionBarSplitStyle" has already been defined
Error:Attribute "actionBarWidgetTheme" has already been defined
Error:Attribute "actionBarSize" has already been defined
Error:Attribute "actionBarDivider" has already been defined
Error:Attribute "actionBarItemBackground" has already been defined
Error:Attribute "actionMenuTextAppearance" has already been defined
Error:Attribute "actionMenuTextColor" has already been defined
Error:Attribute "actionModeStyle" has already been defined
Error:Attribute "actionModeCloseButtonStyle" has already been defined
Error:Attribute "actionModeBackground" has already been defined
Error:Attribute "actionModeSplitBackground" has already been defined
Error:Attribute "actionModeCloseDrawable" has already been defined
Error:Attribute "actionModeShareDrawable" has already been defined
Error:Attribute "actionModePopupWindowStyle" has already been defined
Error:Attribute "textAppearanceLargePopupMenu" has already been defined
Error:Attribute "textAppearanceSmallPopupMenu" has already been defined
Error:Attribute "actionDropDownStyle" has already been defined
Error:Attribute "dropdownListPreferredItemHeight" has already been defined
Error:Attribute "spinnerDropDownItemStyle" has already been defined
Error:Attribute "homeAsUpIndicator" has already been defined
Error:Attribute "actionButtonStyle" has already been defined
Error:Attribute "selectableItemBackground" has already been defined
Error:Attribute "dividerVertical" has already been defined
Error:Attribute "activityChooserViewStyle" has already been defined
Error:Attribute "popupMenuStyle" has already been defined
Error:Attribute "textAppearanceSearchResultTitle" has already been defined
Error:Attribute "textAppearanceSearchResultSubtitle" has already been defined
Error:Attribute "textColorSearchUrl" has already been defined
Error:Attribute "listPreferredItemHeightSmall" has already been defined
Error:Attribute "listPreferredItemPaddingLeft" has already been defined
Error:Attribute "listPreferredItemPaddingRight" has already been defined
Error:Attribute "dropDownListViewStyle" has already been defined
Error:Attribute "listPopupWindowStyle" has already been defined
Error:Attribute "textAppearanceListItemSmall" has already been defined

@NightWhistler
Copy link
Owner

Hi Vinay,

I've started following the instructions here
https://www.grokkingandroid.com/migrating-actionbarsherlock-actionbarcompat/

to remove ActionBarSherlock from the codebase.

I'll push the work to a separate branch.

@mmrasheed
Copy link

Hi Alex,
Is there any progress in migrating from actionbarsherlock to appcompat?

I have been trying the migration myself for last few days, but couldn't overcome few errors. I followed the guideline you mentioned above strictly. I also followed quick instructions from http://stackoverflow.com/questions/20933944/what-are-the-common-issues-when-migrating-from-actionbarsherlock-to-actionbarcom , but without luck.

Moreover, the latest android SDK, 23.x, has removed apache http permanently, rendering Pageturner incompatible with Android 6.0.

Any chance we get this project migrated to appcompat anytime soon?

@vinaywadhwa
Copy link
Author

Alex did another branch for ActionBarSherlock TO AppCompat migration- https://github.com/NightWhistler/PageTurner/tree/appcompatv7

Also, you can still use Apache's HTTP in 6.0

@mmrasheed
Copy link

Thanks vinaywadhwa,
I found that out soon after replying here. That appcompat version compiles fine using terminal command, but showing error in Android Studio. Deatils about this issue at #589

@NightWhistler
Copy link
Owner

The AppCompat branch works and compiles OK, but if I remember correctly it causes some Exceptions when run on older Android versions (Android 2.2 I think).

That's the reason the changes have not been merged to master yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants