You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I entered the code into the Android studio as follows, but an error occurs at runtime.
Is there anything wrong with me?
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import java.util.ArrayList;
import fontastic.FGlyph;
import fontastic.Fontastic;
import processing.core.PApplet;
import processing.core.PVector;
public class MainActivity extends AppCompatActivity{
private PApplet myParent;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Fontastic f = new Fontastic(myParent,"a");
f.setAuthor("test");
PVector[] points = new PVector[4]; // Define a PVector array containing the points of the shape
points[0] = new PVector(0, 0); // Start at bottom left
points[1] = new PVector(512, 0); // The normal width is 512, the normal height 1024
points[2] = new PVector(512, 1024); // y coordinates are from bottom to top!
points[3] = new PVector(0, 1024);
f.addGlyph('A').addContour(points);
f.buildFont();
}
}
error: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.test.fontastic/com.test.fontastic.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String processing.core.PApplet.dataPath(java.lang.String)' on a null object reference
The text was updated successfully, but these errors were encountered:
I entered the code into the Android studio as follows, but an error occurs at runtime.
Is there anything wrong with me?
error:
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.test.fontastic/com.test.fontastic.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String processing.core.PApplet.dataPath(java.lang.String)' on a null object reference
The text was updated successfully, but these errors were encountered: