Android Question Error when compile - Material Design Preferences

mr.gedo

Member
hello everybody,
I hope all are good

i use the library Material Design Preferences https://www.b4x.com/android/forum/threads/preferences-material-design-preferences.75482/

but when try to compile project i get this error

B4X:
B4A Version: 9.80
Java Version: 8
Parsing code.    (0.01s)
Building folders structure.    (0.03s)
Compiling code.    (0.02s)
Compiling layouts code.    (0.00s)
Organizing libraries.    (0.00s)
    (Android Support Library)
Generating R file.    (0.00s)
Compiling debugger engine code.    (0.00s)
Compiling generated Java code.    Error
javac 1.8.0_251
src\de\amberhome\preferenceexample\prefs1.java:17: error: cannot access PreferenceFragmentCompat
public class prefs1 extends de.amberhome.preferences.AppCompatPreferenceActivity implements B4AActivity{
       ^
  class file for androidx.preference.PreferenceFragmentCompat not found
Note: src\de\amberhome\preferenceexample\starter.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
1 error


I deleted b4a and installed a fresh version with all instructions from here - https://www.b4x.com/b4a.html
but the problem still exists

any solution ?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0

mr.gedo

Member
Try to add this line:
B4X:
#AdditionalJar: androidx.preference:preference
Note that the very old preference library will also be based on the material theme: https://www.b4x.com/android/forum/threads/preferenceactivity-library.10609/#content


Hello Erel,
Good day,
after I added this line i get this problem

B4X:
B4A Version: 9.80
Java Version: 8
Parsing code.    (0.02s)
Building folders structure.    (0.02s)
Compiling code.    (0.03s)
Compiling layouts code.    (0.00s)
Organizing libraries.    (0.06s)
    (Android Support Library)
Generating R file.    Error
c:\android\android-sdk\tools\..\extras\b4a_remote\com\android\support\appcompat-v7\28.0.0\unpacked-appcompat-v7-28.0.0\res\values\values.xml:72: error: Attribute "navigationMode" already defined with incompatible format.
c:\android\android-sdk\tools\..\extras\b4a_remote\androidx\appcompat\appcompat\1.1.0\unpacked-appcompat-1.1.0\res\values\values.xml:1697: Original attribute defined here.
c:\android\android-sdk\tools\..\extras\b4a_remote\com\android\support\appcompat-v7\28.0.0\unpacked-appcompat-v7-28.0.0\res\values\values.xml:81: error: Attribute "displayOptions" already defined with incompatible format.
c:\android\android-sdk\tools\..\extras\b4a_remote\androidx\appcompat\appcompat\1.1.0\unpacked-appcompat-1.1.0\res\values\values.xml:1705: Original attribute defined here.
c:\android\android-sdk\tools\..\extras\b4a_remote\com\android\support\appcompat-v7\28.0.0\unpacked-appcompat-v7-28.0.0\res\values\values.xml:252: error: Attribute "tintMode" already defined with incompatible format.
c:\android\android-sdk\tools\..\extras\b4a_remote\androidx\appcompat\appcompat\1.1.0\unpacked-appcompat-1.1.0\res\values\values.xml:1833: Original attribute defined here.
c:\android\android-sdk\tools\..\extras\b4a_remote\com\android\support\appcompat-v7\28.0.0\unpacked-appcompat-v7-28.0.0\res\values\values.xml:279: error: Attribute "tickMarkTintMode" already defined with incompatible format.
c:\android\android-sdk\tools\..\extras\b4a_remote\androidx\appcompat\appcompat\1.1.0\unpacked-appcompat-1.1.0\res\values\values.xml:1860: Original attribute defined here.
c:\android\android-sdk\tools\..\extras\b4a_remote\com\android\support\appcompat-v7\28.0.0\unpacked-appcompat-v7-28.0.0\res\values\values.xml:314: error: Attribute "autoSizeTextType" already defined with incompatible format.
c:\android\android-sdk\tools\..\extras\b4a_remote\androidx\appcompat\appcompat\1.1.0\unpacked-appcompat-1.1.0\res\values\values.xml:1898: Original attribute defined here.
c:\android\android-sdk\tools\..\extras\b4a_remote\com\android\support\appcompat-v7\28.0.0\unpacked-appcompat-v7-28.0.0\res\values\values.xml:434: error: Attribute "actionBarSize" already defined with incompatible format.
c:\android\android-sdk\tools\..\extras\b4a_remote\androidx\appcompat\appcompat\1.1.0\unpacked-appcompat-1.1.0\res\values\values.xml:2051: Original attribute defined here.
c:\android\android-sdk\tools\..\extras\b4a_remote\com\android\support\appcompat-v7\28.0.0\unpacked-appcompat-v7-28.0.0\res\values\values.xml:737: error: Attribute "buttonTintMode" already defined with incompatible format.
c:\android\android-sdk\tools\..\extras\b4a_remote\androidx\appcompat\appcompat\1.1.0\unpacked-appcompat-1.1.0\res\values\values.xml:2374: Original attribute defined here.
c:\android\android-sdk\tools\..\extras\b4a_remote\com\android\support\appcompat-v7\28.0.0\unpacked-appcompat-v7-28.0.0\res\values\values.xml:802: error: Attribute "showDividers" already defined with incompatible format.
c:\android\android-sdk\tools\..\extras\b4a_remote\androidx\appcompat\appcompat\1.1.0\unpacked-appcompat-1.1.0\res\values\values.xml:2437: Original attribute defined here.
c:\android\android-sdk\tools\..\extras\b4a_remote\com\android\support\appcompat-v7\28.0.0\unpacked-appcompat-v7-28.0.0\res\values\values.xml:876: error: Attribute "alphabeticModifiers" already defined with incompatible format.
c:\android\android-sdk\tools\..\extras\b4a_remote\androidx\appcompat\appcompat\1.1.0\unpacked-appcompat-1.1.0\res\values\values.xml:2511: Original attribute defined here.
c:\android\android-sdk\tools\..\extras\b4a_remote\com\android\support\appcompat-v7\28.0.0\unpacked-appcompat-v7-28.0.0\res\values\values.xml:891: error: Attribute "numericModifiers" already defined with incompatible format.
c:\android\android-sdk\tools\..\extras\b4a_remote\androidx\appcompat\appcompat\1.1.0\unpacked-appcompat-1.1.0\res\values\values.xml:2526: Original attribute defined here.
c:\android\android-sdk\tools\..\extras\b4a_remote\com\android\support\appcompat-v7\28.0.0\unpacked-appcompat-v7-28.0.0\res\values\values.xml:918: error: Attribute "showAsAction" already defined with incompatible format.
c:\android\android-sdk\tools\..\extras\b4a_remote\androidx\appcompat\appcompat\1.1.0\unpacked-appcompat-1.1.0\res\values\values.xml:2555: Original attribute defined here.
c:\android\android-sdk\tools\..\extras\b4a_remote\com\android\support\appcompat-v7\28.0.0\unpacked-appcompat-v7-28.0.0\res\values\values.xml:966: error: Attribute "iconTintMode" already defined with incompatible format.
c:\android\android-sdk\tools\..\extras\b4a_remote\androidx\appcompat\appcompat\1.1.0\unpacked-appcompat-1.1.0\res\values\values.xml:2603: Original attribute defined here.
c:\android\android-sdk\tools\..\extras\b4a_remote\com\android\support\appcompat-v7\28.0.0\unpacked-appcompat-v7-28.0.0\res\values\values.xml:1110: error: Attribute "thumbTintMode" already defined with incompatible format.
c:\android\android-sdk\tools\..\extras\b4a_remote\androidx\appcompat\appcompat\1.1.0\unpacked-appcompat-1.1.0\res\values\values.xml:2715: Original attribute defined here.
c:\android\android-sdk\tools\..\extras\b4a_remote\com\android\support\appcompat-v7\28.0.0\unpacked-appcompat-v7-28.0.0\res\values\values.xml:1134: error: Attribute "trackTintMode" already defined with incompatible format.
c:\android\android-sdk\tools\..\extras\b4a_remote\androidx\appcompat\appcompat\1.1.0\unpacked-appcompat-1.1.0\res\values\values.xml:2739: Original attribute defined here.
c:\android\android-sdk\tools\..\extras\b4a_remote\com\android\support\appcompat-v7\28.0.0\unpacked-appcompat-v7-28.0.0\res\values\values.xml:1219: error: Attribute "buttonGravity" already defined with incompatible format.
c:\android\android-sdk\tools\..\extras\b4a_remote\androidx\appcompat\appcompat\1.1.0\unpacked-appcompat-1.1.0\res\values\values.xml:2832: Original attribute defined here.
c:\android\android-sdk\tools\..\extras\b4a_remote\com\android\support\appcompat-v7\28.0.0\unpacked-appcompat-v7-28.0.0\res\values\values.xml:1275: error: Attribute "backgroundTintMode" already defined with incompatible format.
c:\android\android-sdk\tools\..\extras\b4a_remote\androidx\appcompat\appcompat\1.1.0\unpacked-appcompat-1.1.0\res\values\values.xml:2893: Original attribute defined here.
c:\android\android-sdk\tools\..\extras\b4a_remote\com\android\support\support-compat\28.0.0\unpacked-support-compat-28.0.0\res\values\values.xml:36: error: Attribute "fontProviderFetchStrategy" already defined with incompatible format.
c:\android\android-sdk\tools\..\extras\b4a_remote\androidx\core\core\1.2.0\unpacked-core-1.2.0\res\values\values.xml:127: Original attribute defined here.
c:\android\android-sdk\tools\..\extras\b4a_remote\com\android\support\support-compat\28.0.0\unpacked-support-compat-28.0.0\res\values\values.xml:51: error: Attribute "fontProviderFetchTimeout" already defined with incompatible format.
c:\android\android-sdk\tools\..\extras\b4a_remote\androidx\core\core\1.2.0\unpacked-core-1.2.0\res\values\values.xml:139: Original attribute defined here.
c:\android\android-sdk\tools\..\extras\b4a_remote\com\android\support\support-compat\28.0.0\unpacked-support-compat-28.0.0\res\values\values.xml:61: error: Attribute "fontStyle" already defined with incompatible format.
c:\android\android-sdk\tools\..\extras\b4a_remote\androidx\core\core\1.2.0\unpacked-core-1.2.0\res\values\values.xml:147: Original attribute defined here.


However I wouldn't have used any of these libraries. Create a nice cross platform form instead with B4XPreferencesDialogs: [B4X] B4XPreferencesDialog - Cross platform forms

I will try it but is there a solution to the problem on Material Design Preferences ?
 
Upvote 0

mr.gedo

Member
Update...

The problem has been resolved

I deleted b4a and installed again, and i deleted all additional libraries and updated them with the latest version
I updated the SDK and now everything is working fine
 
Upvote 0
Top