Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy am i getting these errors, java truetype error?
    text
    copied!<p>Why does eclipse not let me compile this. I want for myself to click on a button then the <code>Edittext</code> data goes to a <code>Textview</code>. then from there i want the <code>textView</code> to be converted to a bar-code by pressing another <code>Button</code>, so i have 2 <code>Buttons</code> and 2 <code>textViews</code> and 1 <code>editTexts</code> altogether</p> <p>Please tell how to do this or where i,m wrong</p> <pre><code>public class cc extends Activity { EditText inputc; TextView outputc; TextView tv1; ImageView iv; Button b; protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.cc); inputc = (EditText) findViewById(R.id.ccinput); outputc = (TextView) findViewById(R.id.outputc); Button send = (Button) findViewById(R.id.button); final TextView tv1 = (TextView) findViewById(R.id.outputc); tv1.setDrawingCacheEnabled(true); //To change to code 39 barCode font Typeface barcodefont = Typeface.createFromAsset(getAssets(), "fonts/IDAutomationHC39M_FREE.otf"); TextView tv = (TextView) findViewById(R.id.outputc); tv.setTypeface(barcodefont); send.setOnClickListener (new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub tv1.buildDrawingCache(); iv.setImageBitmap(tv1.getDrawingCache()); outputc.setText((inputc.getText())); } }); } } </code></pre> <p>ADTIONAL INFO. I have compiled but now I get error, here is logcat:</p> <pre><code>10-16 15:41:11.095: E/AndroidRuntime(5822): FATAL EXCEPTION: main 10-16 15:41:11.095: E/AndroidRuntime(5822): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.barcodedisplayer/com.example.barcodedisplayer.cc}: java.lang.RuntimeException: native typeface cannot be made 10-16 15:41:11.095: E/AndroidRuntime(5822): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2355) 10-16 15:41:11.095: E/AndroidRuntime(5822): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2405) 10-16 15:41:11.095: E/AndroidRuntime(5822): at android.app.ActivityThread.access$600(ActivityThread.java:156) 10-16 15:41:11.095: E/AndroidRuntime(5822): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1272) 10-16 15:41:11.095: E/AndroidRuntime(5822): at android.os.Handler.dispatchMessage(Handler.java:99) 10-16 15:41:11.095: E/AndroidRuntime(5822): at android.os.Looper.loop(Looper.java:137) 10-16 15:41:11.095: E/AndroidRuntime(5822): at android.app.ActivityThread.main(ActivityThread.java:5303) 10-16 15:41:11.095: E/AndroidRuntime(5822): at java.lang.reflect.Method.invokeNative(Native Method) 10-16 15:41:11.095: E/AndroidRuntime(5822): at java.lang.reflect.Method.invoke(Method.java:525) 10-16 15:41:11.095: E/AndroidRuntime(5822): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:739) 10-16 15:41:11.095: E/AndroidRuntime(5822): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:555) 10-16 15:41:11.095: E/AndroidRuntime(5822): at dalvik.system.NativeStart.main(Native Method) 10-16 15:41:11.095: E/AndroidRuntime(5822): Caused by: java.lang.RuntimeException: native typeface cannot be made 10-16 15:41:11.095: E/AndroidRuntime(5822): at android.graphics.Typeface.&lt;init&gt;(Typeface.java:175) 10-16 15:41:11.095: E/AndroidRuntime(5822): at android.graphics.Typeface.createFromAsset(Typeface.java:149) 10-16 15:41:11.095: E/AndroidRuntime(5822): at com.example.barcodedisplayer.cc.onCreate(cc.java:32) 10-16 15:41:11.095: E/AndroidRuntime(5822): at android.app.Activity.performCreate(Activity.java:5207) 10-16 15:41:11.095: E/AndroidRuntime(5822): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087) 10-16 15:41:11.095: E/AndroidRuntime(5822): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2309) 10-16 15:41:11.095: E/AndroidRuntime(5822): ... 11 more </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload