todo comprobar si esto funciona porque no creoĭialogFragment diceDialog=DiceDialog. There is no obvious reason youd get a NullPointerException from the clear () method.
Toast.makeText(getApplicationContext(),"Error al tirar el dado",Toast.LENGTH_SHORT) lineChart.getData ().clear () will remove all the series from the chart. To initialize a custom policy, we need to implement the Expiry interface: cache = Caffeine.newBuilder().expireAfter(new Expiry() long expireAfterCreate( To configure expire-after-write strategy, we use the expireAfterWrite method: cache = Caffeine.newBuilder() Let's configure the expire-after-access strategy using the expireAfterAccess method: LoadingCache cache = Caffeine.newBuilder()