You need to use a Theme.AppCompat theme (or descendant) with this activity
<p>I am trying to create an activity with a button that runs color picker for my app,
here is my <strong>Activity</strong> code :</p>

<pre><code>public class color extends AppCompatActivity{

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_color);
        final ImageView imgbck= (ImageView) findViewById(R.id.imageView4);
        ImageButton imgbt= (ImageButton) findViewById(R.id.colorpickerbt);
        imgbt.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                ColorPickerDialogBuilder
    .with(getApplicationContext())
    .setTitle("Choose color")
    .wheelType(ColorPickerView.WHEEL_TYPE.FLOWER)
    .density(12)
    .setOnColorSelectedListener(new OnColorSelectedListener() {
        @Override
        public void onColorSelected(int selectedColor) {
            String ss=Integer.toHexString(selectedColor);
            Toast.makeText(getApplicationContext(),ss,Toast.LENGTH_SHORT).show();
        }
    })
    .setPositiveButton("ok", new ColorPickerClickListener() {
        @Override
        public void onClick(DialogInterface dialog, int selectedColor, Integer[] allColors) {
            imgbck.setBackgroundColor(selectedColor);
        }
    })
    .setNegativeButton("cancel", new DialogInterface.OnClickListener() {
        @Override
        public void onClick(DialogInterface dialog, int which) {
        }
    })
    .build()
    .show();
            }
        });

    }
</code></pre>

<p>everything is working fine but when i hit the button i get this error :</p>

<pre><code>FATAL EXCEPTION: main
Process: com.soheil.prolightfa, PID: 31576
java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
at android.support.v7.app.AppCompatDelegateImplV7.createSubDecor(AppCompatDelegateImplV7.java:310)
at android.support.v7.app.AppCompatDelegateImplV7.ensureSubDecor(AppCompatDelegateImplV7.java:279)
at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:253)
at android.support.v7.app.AppCompatDialog.setContentView(AppCompatDialog.java:76)
at android.support.v7.app.AlertController.installContent(AlertController.java:213)
</code></pre>

<p>im also adding my styles:

        
    </p>

<pre><code>&lt;!-- Application theme. --&gt;
&lt;style name="AppTheme" parent="Theme.AppCompat"&gt;
    &lt;!-- All customizations that are NOT specific to a particular API-level can go here. --&gt;
&lt;/style&gt;
</code></pre>

<p>and Style v14</p>

<pre><code>&lt;style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"&gt;
        &lt;!-- API 14 theme customizations can go here. --&gt;
    &lt;/style&gt;
</code></pre>

<p>and v11 </p>

<pre><code>  &lt;style name="AppBaseTheme" parent="Theme.AppCompat"&gt;
        &lt;!-- API 11 theme customizations can go here. --&gt;
    &lt;/style&gt;
</code></pre>

<p>and i also changed the activity to Appcompactactivity
what should i do ?</p>