Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat Should my utility class extend?
    text
    copied!<p>Hi i am creating an external jar file and that is a library for reshaping a text view and here is the reshape class :</p> <pre><code>public class Reshaper extends Activity{ public static Context co; public static void ReshapeTextview(TextView Textview, String fontpath) { Typeface tf = Typeface.createFromAsset(co.getAssets(), fontpath); Textview.setTypeface(tf); PersianReshape.reshape(Textview.getText().toString()); } </code></pre> <p>and here is how i use it in other project that i have imported that jar there.</p> <pre><code>public class Main extends Activity { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); TextView tv = (TextView) findViewById(R.id.textView1); Reshaper.ReshapeTextview(tv, "title.TTF"); } </code></pre> <p>but when i launch it i got a force close !</p> <p>and here is the log:</p> <pre><code>11-29 19:13:48.637: E/AndroidRuntime(1218): Uncaught handler: thread main exiting due to uncaught exception 11-29 19:13:48.678: E/AndroidRuntime(1218): java.lang.NoClassDefFoundError: mr.persian.reshape.Reshaper 11-29 19:13:48.678: E/AndroidRuntime(1218): at com.example.mm.Main.onCreate(Main.java:15) 11-29 19:13:48.678: E/AndroidRuntime(1218): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 11-29 19:13:48.678: E/AndroidRuntime(1218): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459) 11-29 19:13:48.678: E/AndroidRuntime(1218): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512) 11-29 19:13:48.678: E/AndroidRuntime(1218): at android.app.ActivityThread.access$2200(ActivityThread.java:119) 11-29 19:13:48.678: E/AndroidRuntime(1218): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863) 11-29 19:13:48.678: E/AndroidRuntime(1218): at android.os.Handler.dispatchMessage(Handler.java:99) 11-29 19:13:48.678: E/AndroidRuntime(1218): at android.os.Looper.loop(Looper.java:123) 11-29 19:13:48.678: E/AndroidRuntime(1218): at android.app.ActivityThread.main(ActivityThread.java:4363) 11-29 19:13:48.678: E/AndroidRuntime(1218): at java.lang.reflect.Method.invokeNative(Native Method) 11-29 19:13:48.678: E/AndroidRuntime(1218): at java.lang.reflect.Method.invoke(Method.java:521) 11-29 19:13:48.678: E/AndroidRuntime(1218): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) 11-29 19:13:48.678: E/AndroidRuntime(1218): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) 11-29 19:13:48.678: E/AndroidRuntime(1218): at dalvik.system.NativeStart.main(Native Method) </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