Czesc pisze sobie cos w libgdx pod androida mam takie bledy w jendym wlaczam reklamy w drugim nie.
Nie trozumiem bledu NullPointerExeption bo moj kod wyglada tak i nie pokazuje bledow :
package com.libgdx.test;
import com.badlogic.gdx.ApplicationAdapter;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.GL20;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.utils.Timer;
public class Testing extends ApplicationAdapter {
SpriteBatch batch;
Texture img;
Timer time;
@Override
public void create () {
batch = new SpriteBatch();
img = new Texture("badlogic.jpg");
time=new Timer();
}
@Override
public void render () {
Gdx.gl.glClearColor(1, 0, 0, 1);
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
batch.begin();
time.delay(1000);
batch.draw(img, 0, 0);
batch.end();
}
@Override
public void dispose () {
batch.dispose();
img.dispose();
}
}
https://zapodaj.net/f95af42195b1c.png.html
https://zapodaj.net/439f47a53090d.png.html
Z gory dzieki za pomoc