Monday, March 3, 2014

android project into no errors, running tips Unable to instantiate activity ComponentInfo


posts by luxiaoli234 on 2012-05-16 15:45:37 Edit
run specific error log shows

05-16 11:27:42.806: I / dalvikvm (2719): Failed resolving Lcom / sihuatech / wasutv / ui / LoginActivity; interface 195 'Lcom / onewaveinc / softclient / engine / util / http / ProcessNoticeInterface;'
05-16 11:27:42.816: W / dalvikvm (2719): Link of class 'Lcom / sihuatech / wasutv / ui / LoginActivity;' failed
05-16 11:27:42.816: D / AndroidRuntime (2719): Shutting down VM
05-16 11:27:42.816: W / dalvikvm (2719): threadid = 1: thread exiting with uncaught exception (group = 0x4001d8a8)
05-16 11:27:42.816: E / AndroidRuntime (2719): FATAL EXCEPTION: main
05-16 11:27:42.816: E / AndroidRuntime (2719): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo {com.sihuatech.wasutv / com.sihuatech.wasutv.ui.LoginActivity}: java.lang.ClassNotFoundException : com.sihuatech.wasutv.ui.LoginActivity in loader dalvik.system.PathClassLoader [/ data/app/com.sihuatech.wasutv-2.apk]
05-16 11:27:42.816: E / AndroidRuntime (2719): at android.app.ActivityThread.performLaunchActivity (ActivityThread.java: 2585)
05-16 11:27:42.816: E / AndroidRuntime (2719): at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java: 2679)
05-16 11:27:42.816: E / AndroidRuntime (2719): at android.app.ActivityThread.access $ 2300 (ActivityThread.java: 125)
05-16 11:27:42.816: E / AndroidRuntime (2719): at android.app.ActivityThread $ H.handleMessage (ActivityThread.java: 2033)
05-16 11:27:42.816: E / AndroidRuntime (2719): at android.os.Handler.dispatchMessage (Handler.java: 99)
05-16 11:27:42.816: E / AndroidRuntime (2719): at android.os.Looper.loop (Looper.java: 123)
05-16 11:27:42.816: E / AndroidRuntime (2719): at android.app.ActivityThread.main (ActivityThread.java: 4627)
05-16 11:27:42.816: E / AndroidRuntime (2719): at java.lang.reflect.Method.invokeNative (Native Method)
05-16 11:27:42.816: E / AndroidRuntime (2719): at java.lang.reflect.Method.invoke (Method.java: 521)
05-16 11:27:42.816: E / AndroidRuntime (2719): at com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run (ZygoteInit.java: 868)
05-16 11:27:42.816: E / AndroidRuntime (2719): at com.android.internal.os.ZygoteInit.main (ZygoteInit.java: 626)
05-16 11:27:42.816: E / AndroidRuntime (2719): at dalvik.system.NativeStart.main (Native Method)
05-16 11:27:42.816: E / AndroidRuntime (2719): Caused by: java.lang.ClassNotFoundException: com.sihuatech.wasutv.ui.LoginActivity in loader dalvik.system.PathClassLoader [/ data / app / com.sihuatech . wasutv-2.apk]
05-16 11:27:42.816: E / AndroidRuntime (2719): at dalvik.system.PathClassLoader.findClass (PathClassLoader.java: 243)
05-16 11:27:42.816: E / AndroidRuntime (2719): at java.lang.ClassLoader.loadClass (ClassLoader.java: 573)
05-16 11:27:42.816: E / AndroidRuntime (2719): at java.lang.ClassLoader.loadClass (ClassLoader.java: 532)
05-16 11:27:42.816: E / AndroidRuntime (2719): at android.app.Instrumentation.newActivity (Instrumentation.java: 1021)
05-16 11:27:42.816: E / AndroidRuntime (2719): at android.app.ActivityThread.performLaunchActivity (ActivityThread.java: 2577)
05-16 11:27:42.816: E / AndroidRuntime (2719): ... 11 more


Is the link of class I can not find the appropriate class, I checked manitest configuration without problems, the environment settings are also no problem, other projects can be introduced into normal operation, except this project run error, see where you might be error, I have come to the end ...
give me advice, thanks!

<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
What has com.sihuatech.wasutv.ui.LoginActivity class, registered in the manifest it?
Reply:
Caused by: java.lang.ClassNotFoundException: com.sihuatech.wasutv.ui.LoginActivity in loader dalvik.system.PathClassLoader [/ data/app/com.sihuatech.wasutv-2.apk]
Check the registration of the manifest no
Reply:
See AndroidManifest.xml file.
Reply:
Your continued another Activity?
Reply:
The problem, then I solved the problem is not manifest file configuration, but in the import java build path when there are two jar package is not the last election. So after import projects, for without Libraries to import the corresponding jar package, while order and export options in the appropriate jar package also remember tick

Reply:
The problem, then I solved the problem is not manifest file configuration, but in the import java build path when there are two jar package is not the last election. So after import projects, for without Libraries to import the corresponding jar package, while order and export options in the appropriate jar package also remember tick

Reply:
The landlord can say more points you, I have encountered this problem is appearing after adding a new activity issues
references, 5th Floor reply:
The problem, then I solved the problem is not manifest file configuration, but in the import java build path when there are two jar package is not the last election. So after import projects, for without Libraries to import the corresponding jar package, while order and export options in the appropriate jar package also remember tick

Reply:
Your use of the newly added activity jar package, and if used, that is, the package is not imported correctly. . Because some packages are priority needs to be placed top, otherwise it can not find.


reference to the 7th floor of replies:
landlord more points you can say, I have encountered this problem, is added after the emergence of a new issue activity references, 5th Floor reply:

The problem, then I solved the problem is not manifest file configuration, but in the import java build path when there are two jar package is not the last election. So after import projects, for without Libraries to import the corresponding jar package, while order and export options in the appropriate jar package also remember tick

Reply:
Specific point does not? contacts plus the corresponding lib file, the compiler no problem, but the added contacts into the application, the process is terminated. Appear 07-23 11:07:56.114: I / ActivityThread (177): Pub com.android.social: com.android.providers.contacts.SocialProvider
07-23 11:07:56.364: I / ActivityThread (177): Pub applications: com.android.providers.applications.ApplicationsProvider
07-23 11:07:56.784: D / dalvikvm (177): GC_CONCURRENT freed 407K, 54% free 2613K/5639K, external 716K/1038K, paused 3ms +19 ms
07-23 11:07:57.413: I / ActivityThread (177): Pub contacts; com.android.contacts: com.android.providers.contacts.ContactsProvider2
07-23 11:07:59.163: I / ActivityThread (177): Pub call_log: com.android.providers.contacts.CallLogProvider
07-23 11:07:59.183: I / ActivityThread (177): Pub user_dictionary: com.android.providers.userdictionary.UserDictionaryProvider
07-23 11:08:13.584: D / dalvikvm (177): GC_EXPLICIT freed 238K, 51% free 2769K/5639K, external 716K/1038K, paused 56ms
07-23 11:08:16.563: I / dalvikvm (328): Could not find method android.widget.TabHost.addTab, referenced from method com.android.contactstest.DialtactsActivity.setupCallLogTab
07-23 11:08:16.563: W / dalvikvm (328): VFY: unable to resolve virtual method 1095: Landroid / widget / TabHost; addTab (Landroid / widget / TabHost $ TabSpec; Z) V
.07-23 11:08:16.563: D / dalvikvm (328): VFY: replacing opcode 0x6e at 0x0053
07-23 11:08:16.563: D / dalvikvm (328): VFY: dead code 0x0056-0056 in Lcom / android / contactstest / DialtactsActivity; setupCallLogTab () V
.07-23 11:08:16.563: I / dalvikvm (328): Could not find method android.widget.TabHost.addTab, referenced from method com.android.contactstest.DialtactsActivity.setupContactsTab
07-23 11:08:16.563: W / dalvikvm (328): VFY: unable to resolve virtual method 1095: Landroid / widget / TabHost; addTab (Landroid / widget / TabHost $ TabSpec; Z) V
.07-23 11:08:16.573: D / dalvikvm (328): VFY: replacing opcode 0x6e at 0x0053
07-23 11:08:16.573: D / dalvikvm (328): VFY: dead code 0x0056-0056 in Lcom / android / contactstest / DialtactsActivity; setupContactsTab () V
.07-23 11:08:16.583: I / dalvikvm (328): Could not find method android.widget.TabHost.addTab, referenced from method com.android.contactstest.DialtactsActivity.setupDialerTab
07-23 11:08:16.583: W / dalvikvm (328): VFY: unable to resolve virtual method 1095: Landroid / widget / TabHost; addTab (Landroid / widget / TabHost $ TabSpec; Z) V
.07-23 11:08:16.583: D / dalvikvm (328): VFY: replacing opcode 0x6e at 0x0052
07-23 11:08:16.583: D / dalvikvm (328): VFY:. Dead code 0x0055-0055 in Lcom / android / contactstest / DialtactsActivity; setupDialerTab () V
07-23 11:08:16.583: I / dalvikvm (328): Could not find method android.widget.TabHost.addTab, referenced from method com.android.contactstest.DialtactsActivity.setupFavoritesTab
07-23 11:08:16.583: W / dalvikvm (328): VFY: unable to resolve virtual method 1095: Landroid / widget / TabHost; addTab (Landroid / widget / TabHost $ TabSpec; Z) V
.07-23 11:08:16.583: D / dalvikvm (328): VFY: replacing opcode 0x6e at 0x0053
07-23 11:08:16.583: D / dalvikvm (328): VFY: dead code 0x0056-0056 in Lcom / android / contactstest / DialtactsActivity; setupFavoritesTab () V
.07-23 11:08:16.583: I / dalvikvm (328): Could not find method android.widget.TabHost.addTab, referenced from method com.android.contactstest.DialtactsActivity.setupGroupTab
07-23 11:08:16.583: W / dalvikvm (328): VFY: unable to resolve virtual method 1095: Landroid / widget / TabHost; addTab (Landroid / widget / TabHost $ TabSpec; Z) V
.07-23 11:08:16.583: D / dalvikvm (328): VFY: replacing opcode 0x6e at 0x0053
07-23 11:08:16.583: D / dalvikvm (328): VFY: dead code 0x0056-0056 in Lcom / android / contactstest / DialtactsActivity; setupGroupTab () V
.07-23 11:08:16.594: I / dalvikvm (328): Could not find method android.app.StatusBarManager.showSIMIndicator, referenced from method com.android.contactstest.DialtactsActivity.setSimIndicatorVisibility
07-23 11:08:16.594: W / dalvikvm (328): VFY: unable to resolve virtual method 143: Landroid / app / StatusBarManager; showSIMIndicator (Landroid / content / ComponentName; Ljava / lang / String ;) V 07-23 11:08:16.594: D / dalvikvm (328): VFY: replacing opcode 0x6e at 0x000a
07-23 11:08:16.594: I / dalvikvm (328): Could not find method android.app.StatusBarManager.hideSIMIndicator, referenced from method com.android.contactstest.DialtactsActivity.setSimIndicatorVisibility
07-23 11:08:16.594: W / dalvikvm (328): VFY: unable to resolve virtual method 142: Landroid / app / StatusBarManager; hideSIMIndicator (Landroid / content / ComponentName ;) V
.07-23 11:08:16.594: D / dalvikvm (328): VFY: replacing opcode 0x6e at 0x0014
07-23 11:08:16.594: D / dalvikvm (328): VFY: dead code 0x000d-000d in Lcom / android / contactstest / DialtactsActivity; setSimIndicatorVisibility (Z) V
.07-23 11:08:16.594: D / dalvikvm (328): VFY:. Dead code 0x0017-0017 in Lcom / android / contactstest / DialtactsActivity; setSimIndicatorVisibility (Z) V
07-23 11:08:16.604: W / Dailtacts (328): ---------------------------------- --- onCreate ()
07-23 11:08:16.604: V / Dailtacts (328): setContentView11 = 17367138
07-23 11:08:16.635: V / Dailtacts (328): inflater = com.android.internal.policy.impl.PhoneLayoutInflater @ 4058e748
07-23 11:08:16.663: D / AndroidRuntime (328): Shutting down VM
07-23 11:08:16.663: W / dalvikvm (328): threadid = 1: thread exiting with uncaught exception (group = 0x40015560)
07-23 11:08:16.674: E / AndroidRuntime (328): FATAL EXCEPTION: main
07-23 11:08:16.674: E / AndroidRuntime (328): java.lang.NoSuchMethodError: android.widget.TabHost.addTab
07-23 11:08:16.674: E / AndroidRuntime (328): at com.android.contactstest.DialtactsActivity.setupDialerTab (DialtactsActivity.java: 285)
07-23 11:08:16.674: E / AndroidRuntime (328): at com.android.contactstest.DialtactsActivity.onCreate (DialtactsActivity.java: 148)
07-23 11:08:16.674: E / AndroidRuntime (328): at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java: 1047)
07-23 11:08:16.674: E / AndroidRuntime (328): at android.app.ActivityThread.performLaunchActivity (ActivityThread.java: 1611)
07-23 11:08:16.674: E / AndroidRuntime (328): at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java: 1663)
07-23 11:08:16.674: E / AndroidRuntime (328): at android.app.ActivityThread.access $ 1500 (ActivityThread.java: 117)
07-23 11:08:16.674: E / AndroidRuntime (328): at android.app.ActivityThread $ H.handleMessage (ActivityThread.java: 931)
07-23 11:08:16.674: E / AndroidRuntime (328): at android.os.Handler.dispatchMessage (Handler.java: 99)
07-23 11:08:16.674: E / AndroidRuntime (328): at android.os.Looper.loop (Looper.java: 123)
07-23 11:08:16.674: E / AndroidRuntime (328): at android.app.ActivityThread.main (ActivityThread.java: 3683)
07-23 11:08:16.674: E / AndroidRuntime (328): at java.lang.reflect.Method.invokeNative (Native Method)
07-23 11:08:16.674: E / AndroidRuntime (328): at java.lang.reflect.Method.invoke (Method.java: 507)
07-23 11:08:16.674: E / AndroidRuntime (328): at com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run (ZygoteInit.java: 839)
07-23 11:08:16.674: E / AndroidRuntime (328): at com.android.internal.os.ZygoteInit.main (ZygoteInit.java: 597)
07-23 11:08:16.674: E / AndroidRuntime (328): at dalvik.system.NativeStart.main (Native Method) error
Reply:
I encountered this problem, according to the landlord said the way to solve .. if you introduce a package, then we should choose the jar file at run time.
Reply:
reference to the 8th floor luxiaoli234 reply:
newly added activity you used the jar package, and if used, that is, the package is not imported correctly. . Because some packages are priority needs to be placed top, otherwise it can not find.


[Quote = reference to the 7th floor of replies:]

The landlord can say more points you, I have encountered this problem is appearing after adding a new reference to the fifth floor activity issues reply:

The problem, then I solved the problem is not manifest file configuration, but in the import java build path when there are two jar package is not the last election. So after import projects, for without Libraries to import the corresponding jar package, while order and export options in the appropriate jar package also remember tick

No comments:

Post a Comment