0

I have created an attendance taking application which perfectly runs on my android 2.2 targeted emulator but when i run it on a android 4.0 emulator it force closes as shown below: Login page

but as you can see it shows the login page in background but closes.

Here's the complete logcat:

    03-25 16:17:21.797: D/gralloc_goldfish(634): Emulator without GPU emulation detected.
03-25 16:17:25.817: W/dalvikvm(634): threadid=11: thread exiting with uncaught exception (group=0x409961f8)
03-25 16:17:25.817: E/AndroidRuntime(634): FATAL EXCEPTION: Thread-84
03-25 16:17:25.817: E/AndroidRuntime(634): java.lang.UnsupportedOperationException
03-25 16:17:25.817: E/AndroidRuntime(634):  at java.lang.Thread.stop(Thread.java:1076)
03-25 16:17:25.817: E/AndroidRuntime(634):  at java.lang.Thread.stop(Thread.java:1063)
03-25 16:17:25.817: E/AndroidRuntime(634):  at com.shubh.univattendance.SplashScreen$1.run(SplashScreen.java:38)
03-25 16:17:27.667: W/TextLayoutCache(634): computeValuesWithHarfbuzz -- need to force to single run


    W/TextLayoutCache(798): computeValuesWithHarfbuzz -- need to force to single run

To see my codes here's my github directory Click here

Please any suggestion is warmly welcome..Thanks in advance:)

user120044
  • 125
  • 1
  • 5
  • I think the minSDK should be referenced to 2.2 froyo and thr targetSDK should be he latest version of android. – Aashir Mar 25 '14 at 10:50
  • To answer the **TITLE** of your question: **`YES`**. To answer the **BODY** of your question: post your **FULL** LogCat – Phantômaxx Mar 25 '14 at 10:58

2 Answers2

0

Yes, Android 4.4 can run Android 2.2 targeted and Android 2.2 can run Android 4.4 targeted (if there'is no Android 2.3+ functions call and min sdk version is setted to Android 2.2-).

Please post the full stacktrace to find the error

alvinmeimoun
  • 1,472
  • 1
  • 19
  • 38
0

The answer is 'Yes - provided you are careful about using deprecated methods'. The method

Thread.stop()

has been deprecated by Sun/Oracle for a long time, as it's intrinsically unsafe.

I'm assuming that the 2.2 JVM equivalent lets you get away with it, but API 14 has finally pulled the plug on it. The clue is there in your logcat

03-25 16:17:25.817: E/AndroidRuntime(634): FATAL EXCEPTION: Thread-84
03-25 16:17:25.817: E/AndroidRuntime(634): java.lang.UnsupportedOperationException
03-25 16:17:25.817: E/AndroidRuntime(634):  at java.lang.Thread.stop(Thread.java:1076)

.

NickT
  • 23,844
  • 11
  • 78
  • 121
  • There are many posts in many places about how to stop a Thread the proper way. Here's just one http://stackoverflow.com/questions/3194545/how-to-stop-a-java-thread-gracefully You should Google for "Java" + "stop a thread" – NickT Mar 25 '14 at 12:21