B4A Library CameraFilter - 12 Aug: update in post #26

A shortcut wrap for this Github project. It applies a variety of filters to the live preview of the camera. I have asked the author of the Github project to add the necessary code so that pictures can be taken. He has agreed to do so and I will post an updated project once that is done.

You need the following Jars in your additional library folder (recent versions):
android-support-v7-appcompat.jar
android-support-v4.jar

Take note of the following code in the B4A project and set you path to suite your own computer:
B4X:
'IMPORTANT!!!! YOU NEED TO SET THE FOLLOWING PATHS CORRECTLY FOR YOUR OWN COMPUTER!!!!!!!!!!!!!!!!!!
'THE BELOW PATH IS THE PATH FOR MY COMPUTER
#AdditionalRes: C:\ANDRIOD_SDK_TOOLS\extras\android\support\v7\appcompat\res, android.support.v7.appcompat

Posting the following:
1. B4A library files - copy them to your additional library folder
2. B4A sample project

Sample code:
B4X:
#Region  Project Attributes
    #ApplicationLabel: CameraFilter
    #VersionCode: 1
    #VersionName:
    'SupportedOrientations possible values: unspecified, landscape or portrait.
    #SupportedOrientations: unspecified
    #CanInstallToExternalStorage: False
#End Region

#AdditionalRes: ..\resource
#AdditionalRes: ..\CameraFilter_res

'IMPORTANT!!!! YOU NEED TO SET THE FOLLOWING PATHS CORRECTLY FOR YOUR OWN COMPUTER!!!!!!!!!!!!!!!!!!
'THE BELOW PATH IS THE PATH FOR MY COMPUTER
#AdditionalRes: C:\ANDRIOD_SDK_TOOLS\extras\android\support\v7\appcompat\res, android.support.v7.appcompat

#Extends: android.support.v7.app.AppCompatActivity

#Region  Activity Attributes
    #FullScreen: False
    #IncludeTitle: True
#End Region

Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.
 
End Sub

Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.

    Private Button1 As Button
    Private Label1 As Label
    Dim camerafilter As CameraFilter
 
End Sub

Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
 
    Activity.LoadLayout("main")
    camerafilter.Initialize("camerafilter")
    Label1.Visible = True
    Label1.Text = "Wrapped by Johan Schoeman"

End Sub

Sub Activity_Resume
 
 
End Sub

Sub Activity_Pause (UserClosed As Boolean)

End Sub

Sub Button1_Click
 
  camerafilter.StartCameraFilter

End Sub

Pics of some of the available preview filters:

10.png


1.png



2.png


3.png



4.png


5.png


6.png


7.png
 

Attachments

  • b4aCameraFilter.zip
    256 KB · Views: 346
  • CameraFilterLibFiles.zip
    26.2 KB · Views: 335
Last edited:

susu

Well-Known Member
Licensed User
Longtime User
I got these errors when compile

B4A version: 6.00
Parsing code. (0.00s)
Compiling code. (0.04s)

ObfuscatorMap.txt file created in Objects folder.
Compiling layouts code. (0.00s)
Organizing libraries. (2.54s)
Generating R file. Error
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:28: error: Attribute "title" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:29: error: Attribute "height" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:31: error: Attribute "isLightTheme" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:43: error: Attribute "windowActionBar" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:46: error: Attribute "windowNoTitle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:51: error: Attribute "windowActionBarOverlay" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:55: error: Attribute "windowActionModeOverlay" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:60: error: Attribute "windowFixedWidthMajor" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:64: error: Attribute "windowFixedHeightMinor" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:69: error: Attribute "windowFixedWidthMinor" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:73: error: Attribute "windowFixedHeightMajor" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:79: error: Attribute "windowMinWidthMajor" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:84: error: Attribute "windowMinWidthMinor" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:94: error: Attribute "actionBarTabStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:95: error: Attribute "actionBarTabBarStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:96: error: Attribute "actionBarTabTextStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:97: error: Attribute "actionOverflowButtonStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:98: error: Attribute "actionOverflowMenuStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:101: error: Attribute "actionBarPopupTheme" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:103: error: Attribute "actionBarStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:108: error: Attribute "actionBarSplitStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:112: error: Attribute "actionBarTheme" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:120: error: Attribute "actionBarWidgetTheme" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:123: error: Attribute "actionBarSize" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:127: error: Attribute "actionBarDivider" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:129: error: Attribute "actionBarItemBackground" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:132: error: Attribute "actionMenuTextAppearance" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:135: error: Attribute "actionMenuTextColor" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:142: error: Attribute "actionModeStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:143: error: Attribute "actionModeCloseButtonStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:145: error: Attribute "actionModeBackground" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:147: error: Attribute "actionModeSplitBackground" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:149: error: Attribute "actionModeCloseDrawable" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:151: error: Attribute "actionModeCutDrawable" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:153: error: Attribute "actionModeCopyDrawable" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:155: error: Attribute "actionModePasteDrawable" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:157: error: Attribute "actionModeSelectAllDrawable" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:159: error: Attribute "actionModeShareDrawable" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:161: error: Attribute "actionModeFindDrawable" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:163: error: Attribute "actionModeWebSearchDrawable" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:166: error: Attribute "actionModePopupWindowStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:174: error: Attribute "textAppearanceLargePopupMenu" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:176: error: Attribute "textAppearanceSmallPopupMenu" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:185: error: Attribute "dialogTheme" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:187: error: Attribute "dialogPreferredPadding" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:189: error: Attribute "listDividerAlertDialog" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:197: error: Attribute "actionDropDownStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:199: error: Attribute "dropdownListPreferredItemHeight" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:201: error: Attribute "spinnerDropDownItemStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:203: error: Attribute "homeAsUpIndicator" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:206: error: Attribute "actionButtonStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:209: error: Attribute "buttonBarStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:211: error: Attribute "buttonBarButtonStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:215: error: Attribute "selectableItemBackground" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:217: error: Attribute "selectableItemBackgroundBorderless" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:219: error: Attribute "borderlessButtonStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:221: error: Attribute "dividerVertical" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:223: error: Attribute "dividerHorizontal" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:225: error: Attribute "activityChooserViewStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:228: error: Attribute "toolbarStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:230: error: Attribute "toolbarNavigationButtonStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:233: error: Attribute "popupMenuStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:235: error: Attribute "popupWindowStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:238: error: Attribute "editTextColor" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:240: error: Attribute "editTextBackground" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:243: error: Attribute "imageButtonStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:250: error: Attribute "textAppearanceSearchResultTitle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:252: error: Attribute "textAppearanceSearchResultSubtitle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:254: error: Attribute "textColorSearchUrl" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:256: error: Attribute "searchViewStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:264: error: Attribute "listPreferredItemHeight" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:266: error: Attribute "listPreferredItemHeightSmall" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:268: error: Attribute "listPreferredItemHeightLarge" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:271: error: Attribute "listPreferredItemPaddingLeft" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:273: error: Attribute "listPreferredItemPaddingRight" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:276: error: Attribute "dropDownListViewStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:277: error: Attribute "listPopupWindowStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:280: error: Attribute "textAppearanceListItem" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:282: error: Attribute "textAppearanceListItemSmall" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:291: error: Attribute "panelBackground" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:293: error: Attribute "panelMenuListWidth" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:295: error: Attribute "panelMenuListTheme" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:297: error: Attribute "listChoiceBackgroundIndicator" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:306: error: Attribute "colorPrimary" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:310: error: Attribute "colorPrimaryDark" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:314: error: Attribute "colorAccent" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:317: error: Attribute "colorControlNormal" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:320: error: Attribute "colorControlActivated" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:323: error: Attribute "colorControlHighlight" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:326: error: Attribute "colorButtonNormal" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:329: error: Attribute "colorSwitchThumbNormal" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:332: error: Attribute "controlBackground" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:338: error: Attribute "alertDialogStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:339: error: Attribute "alertDialogButtonGroupStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:340: error: Attribute "alertDialogCenterButtons" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:342: error: Attribute "alertDialogTheme" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:345: error: Attribute "textColorAlertDialogListItem" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:348: error: Attribute "buttonBarPositiveButtonStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:351: error: Attribute "buttonBarNegativeButtonStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:354: error: Attribute "buttonBarNeutralButtonStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:362: error: Attribute "autoCompleteTextViewStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:364: error: Attribute "buttonStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:366: error: Attribute "buttonStyleSmall" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:368: error: Attribute "checkboxStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:370: error: Attribute "checkedTextViewStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:372: error: Attribute "editTextStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:374: error: Attribute "radioButtonStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:376: error: Attribute "ratingBarStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:378: error: Attribute "ratingBarStyleIndicator" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:380: error: Attribute "ratingBarStyleSmall" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:382: error: Attribute "seekBarStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:384: error: Attribute "spinnerStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:386: error: Attribute "switchStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:402: error: Attribute "navigationMode" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:411: error: Attribute "displayOptions" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:423: error: Attribute "subtitle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:425: error: Attribute "titleTextStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:427: error: Attribute "subtitleTextStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:429: error: Attribute "icon" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:431: error: Attribute "logo" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:433: error: Attribute "divider" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:435: error: Attribute "background" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:437: error: Attribute "backgroundStacked" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:439: error: Attribute "backgroundSplit" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:441: error: Attribute "customNavigationLayout" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:445: error: Attribute "homeLayout" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:447: error: Attribute "progressBarStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:449: error: Attribute "indeterminateProgressStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:451: error: Attribute "progressBarPadding" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:456: error: Attribute "itemPadding" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:458: error: Attribute "hideOnContentScroll" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:461: error: Attribute "contentInsetStart" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:464: error: Attribute "contentInsetEnd" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:467: error: Attribute "contentInsetLeft" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:470: error: Attribute "contentInsetRight" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:472: error: Attribute "elevation" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:475: error: Attribute "popupTheme" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:499: error: Attribute "closeItemLayout" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:504: error: Attribute "paddingStart" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:506: error: Attribute "paddingEnd" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:515: error: Attribute "theme" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:525: error: Attribute "backgroundTint" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:528: error: Attribute "backgroundTintMode" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:562: error: Attribute "preserveIconSpacing" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:644: error: Attribute "showAsAction" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:669: error: Attribute "actionLayout" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:674: error: Attribute "actionViewClass" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:680: error: Attribute "actionProviderClass" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:699: error: Attribute "layout" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:702: error: Attribute "iconifiedByDefault" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:706: error: Attribute "queryHint" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:709: error: Attribute "defaultQueryHint" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:715: error: Attribute "closeIcon" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:717: error: Attribute "goIcon" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:719: error: Attribute "searchIcon" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:721: error: Attribute "searchHintIcon" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:723: error: Attribute "voiceIcon" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:725: error: Attribute "commitIcon" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:727: error: Attribute "suggestionRowLayout" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:729: error: Attribute "queryBackground" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:731: error: Attribute "submitBackground" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:738: error: Attribute "initialActivityCount" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:745: error: Attribute "expandActivityOverflowButtonDrawable" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:750: error: Attribute "textAllCaps" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:777: error: Attribute "measureWithLargestChild" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:781: error: Attribute "showDividers" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:788: error: Attribute "dividerPadding" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:799: error: Attribute "titleTextAppearance" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:800: error: Attribute "subtitleTextAppearance" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:804: error: Attribute "titleMargins" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:805: error: Attribute "titleMarginStart" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:806: error: Attribute "titleMarginEnd" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:807: error: Attribute "titleMarginTop" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:808: error: Attribute "titleMarginBottom" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:813: error: Attribute "maxButtonHeight" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:815: error: Attribute "collapseIcon" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:817: error: Attribute "collapseContentDescription" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:823: error: Attribute "navigationIcon" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:826: error: Attribute "navigationContentDescription" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:836: error: Attribute "logoDescription" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:838: error: Attribute "titleTextColor" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:840: error: Attribute "subtitleTextColor" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:845: error: Attribute "state_above_anchor" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:857: error: Attribute "overlapAnchor" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:863: error: Attribute "color" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:865: error: Attribute "spinBars" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:867: error: Attribute "drawableSize" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:869: error: Attribute "gapBetweenBars" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:871: error: Attribute "arrowHeadLength" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:873: error: Attribute "arrowShaftLength" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:875: error: Attribute "barLength" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:877: error: Attribute "thickness" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:880: error: Attribute "drawerArrowStyle" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:895: error: Attribute "buttonTint" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:898: error: Attribute "buttonTintMode" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:920: error: Attribute "track" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:926: error: Attribute "thumbTextPadding" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:928: error: Attribute "switchTextAppearance" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:930: error: Attribute "switchMinWidth" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:932: error: Attribute "switchPadding" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:934: error: Attribute "splitTrack" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:936: error: Attribute "showText" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:954: error: Attribute "buttonPanelSideLayout" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:955: error: Attribute "listLayout" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:956: error: Attribute "multiChoiceItemLayout" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:957: error: Attribute "singleChoiceItemLayout" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:958: error: Attribute "listItemLayout" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:965: error: Attribute "allowStacking" has already been defined
d:\android-sdk\extras\android\support\v7\appcompat\res\values\attrs.xml:971: error: Attribute "srcCompat" has already been defined
C:\Users\Su\Desktop\b4aCameraFilter\Objects\bin\extra\res1\res\values-v23\values-v23.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
C:\Users\Su\Desktop\b4aCameraFilter\Objects\bin\extra\res1\res\values-v23\values-v23.xml:34: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.

I'm using AppCombat lib v3.2. Anyway to fix it? Thanks.
 

Johan Schoeman

Expert
Licensed User
Longtime User
I got these errors when compile



I'm using AppCombat lib v3.2. Anyway to fix it? Thanks.
See what happens when you comment this line in the B4A project:
B4X:
'#Extends: android.support.v7.app.AppCompatActivity
 

Johan Schoeman

Expert
Licensed User
Longtime User
Last edited:

susu

Well-Known Member
Licensed User
Longtime User
It works and very nice! I really want it ;)
 

susu

Well-Known Member
Licensed User
Longtime User
At first, I tried Appcombat v2, it's error so I upgrade to v3.2 but nothing change. Can we use your lib without Appcombat?
 

moster67

Expert
Licensed User
Longtime User
Hi Johan,
Looks great from the pictures you posted.

I tried to use your sample project but I am unable to compile it.
I get the following error while compiling:

Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.

Full error is this:

B4A version: 6.00
Parsing code. (0.00s)
Compiling code. (0.03s)
Compiling layouts code. (0.02s)
Organizing libraries. (0.02s)
Generating R file. Error
c:\android\android-sdk\extras\android\support\v7\appcompat\res\values-v23\styles_base.xml:20: error: Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
c:\android\android-sdk\extras\android\support\v7\appcompat\res\values-v23\styles_base_text.xml:19: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.

The path is correct and the files "styles_base.xml" and "styles_base_text.xml" are present which you can see from the screenshot I am attaching.

I also updated all APIs and SDKs and made sure I copied the most recent versions of:
android-support-v7-appcompat.jar
android-support-v4.jar

to my additional library folder

Any ideas?
 

Attachments

  • compilation_error.jpg
    compilation_error.jpg
    433.9 KB · Views: 265

Johan Schoeman

Expert
Licensed User
Longtime User
Hi Johan,
Looks great from the pictures you posted.

I tried to use your sample project but I am unable to compile it.
I get the following error while compiling:



Full error is this:



The path is correct and the files "styles_base.xml" and "styles_base_text.xml" are present which you can see from the screenshot I am attaching.

I also updated all APIs and SDKs and made sure I copied the most recent versions of:
android-support-v7-appcompat.jar
android-support-v4.jar

to my additional library folder

Any ideas?
Mike, see what happens if you remove values-v23 from the folder - copy it somewhere outside of this folder so that it does not see it

c:\android\android-sdk\extras\android\support\v7\appcompat\res\values-v23

What is the minimum SDK set in your B4A manifest?
 

Johan Schoeman

Expert
Licensed User
Longtime User
Hi Johan,
Looks great from the pictures you posted.

I tried to use your sample project but I am unable to compile it.
I get the following error while compiling:



Full error is this:



The path is correct and the files "styles_base.xml" and "styles_base_text.xml" are present which you can see from the screenshot I am attaching.

I also updated all APIs and SDKs and made sure I copied the most recent versions of:
android-support-v7-appcompat.jar
android-support-v4.jar

to my additional library folder

Any ideas?
Also try to "clean" the project. I think it is Tools ----> Clean Project
 

moster67

Expert
Licensed User
Longtime User
Mike, see what happens if you remove value-v23 from the folder
Changing the target in the manifest did not change anything.
But moving the folder as you suggested let me compile the app. :confused:
Why is that?
 

Johan Schoeman

Expert
Licensed User
Longtime User
Changing the target in the manifest did not change anything.
But moving the folder as you suggested let me compile the app. :confused:
Why is that?
F...K....I have had a similar problem before and removing the values-v23 folder solved it (I found it being mentioned somewhere on StackOverflow and tried it and it worked).
 

moster67

Expert
Licensed User
Longtime User
Weird...well as long as it does not prejudice the distribution of an app, then I guess it is OK.
Good to know. Thanks.

BTW: love the wrapper. Nice one!
 

susu

Well-Known Member
Licensed User
Longtime User
Next silly questions: How to switch to front camera? How to take picture? I guess by saving screen shot?
 
Top