android - reference to library project -
I have a project marked as a library and uses that main library It seems that everything is fine , The main project's manifest has library activity with the hole name (package.Nname) but I do not know how to call library classes, I have the main effect (import com.example. Libreriasuscripcion.MainActivity;) from main library And when I do it this way I call from:
@Override Public Zeros click on (see V) {// TODO auto generated method stub Log.d ("Zoogo - Oncate", "On OnClick" ); Int'l i = new intent (getBaseContext (), MainActivity.class); StartActivity (i); } There is an error: This log is Cat
03-21 09: 45: 00.534: E / Android Random (413): Fatal exception: main September 3 to 21: 45: 00,534 e / AndroidRuntime (413): java.lang.RuntimeException: unable to instances of activity ComponentInfo {com.example.juego / com.example.libreriasuscripcion.MainActivity}: java. lang.InstantiationException: com.example.libreriasuscripcion.MainActivity 03-21 Sept: 45: 00,534 e / AndroidRuntime (413): android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2585) on September 3 to 21: 45 : 00.534: E / AndroidRuntime (413): android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2679) on 03-21 September: 45: 00.534: E / AndroidRuntime (41 3): android.app.ActivityThread.access $ 2300 (Less than ActivityThread.java:125) 03-21 09: 45: 00.534: E / Android Random (413): Android. App ActiveTrade $ H Hondal Message (ActivityTrad.Java 2033) 03-21 09:45: 00.534: E / Android Time (413): Android.OS Handler Dispatch Message (Handler. Java: 99) 03-21 09: 45: 00.534: E / Android Time (413): On Android. Looper Loop (Looper.java:123) 03-21 09: 45: 00.534: E / Android Random (413): Android. App Aktivtitredkmain (Gtividhithyfkjwa Skris 627) 03 -21 09: 45: 00,534 E / Android Rntmum (413): java.lang.reflect.Method.invokeNative (the original method) 03-21 09: 45: 00,534: E / Android TimeTime (413): at java.lang Reflect.Method.invoke (Method.java: 21) 03-21 09: 45: 00.534: E / Androidrentaim (413): com.android.internal.os.ZygoteInit at $ MethodAndArgsCaller.run (ZygoteInit.java:868) 03 -21 09: 45: 00,534 e / Androidrentaim (413) on ComkandroidkinternalkoskZygoteInitkmain (Jhigoteinit. Jawaः 626) 03-21 09: 45: 00,534 e / Androidrentaim (413): 45 : 00.534: dalvik.system.NativeStart.main (Native method) 03-21 e / AndroidRuntime (413) in 09: java.lang.InstantiationException: because of com.example.libreriasuscripcion.MainActivity 03-21 09: 45: 00.534: E / Android Runtime (413): at java.lang.Class.newInstanceImpl (basic method) 03-21 09: 45: 00.534: E / Android time (413): at java.lang.Class.newInstance (cell .Java: 1429) 03-21 9: 45: 0 0.534: E / AndroidRuntime (413): android.app.Instrumentation.newActivity (Instrumentation.java:1021) 03-21 September: 45: 00.534: E / AndroidRuntime (413): android.app.ActivityThread.performLaunchActivity (ActivityThread .java: 2577) 03-21 09: 45: 00.534: E / Android Random (413): ... 11 more Can you help me ?? If you are using Eclipse IDE, remember to include the library with your exported APK file. Thanks in advance
Right click on your project, property-> Java Build Go to Path-> Order & Export .
Comments
Post a Comment