Android : Connecting to MySQL using PHP

Posted by user1771128 on Stack Overflow See other posts from Stack Overflow or by user1771128
Published on 2012-10-28T10:56:51Z Indexed on 2012/10/28 11:00 UTC
Read the original article Hit count: 161

Filed under:
|

I followed the following article

http://blog.sptechnolab.com/2011/02/10/android/android-connecting-to-mysql-using-php/

I am able to execute my php file. I executed it individually and its working fine. The problem is in the android execution part. Am posting the Log Cat for the error am facing. Tried putting in a List View with id "list" but the error stil 10-28 16:08:27.201: E/AndroidRuntime(664): **FATAL EXCEPTION: main** 10-28 16:08:27.201: E/AndroidRuntime(664): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.city/com.example.city.City}: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list' 10-28 16:08:27.201: E/AndroidRuntime(664): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956) 10-28 16:08:27.201: E/AndroidRuntime(664): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981) 10-28 16:08:27.201: E/AndroidRuntime(664): at android.app.ActivityThread.access$600(ActivityThread.java:123) 10-28 16:08:27.201: E/AndroidRuntime(664): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147) 10-28 16:08:27.201: E/AndroidRuntime(664): at android.os.Handler.dispatchMessage(Handler.java:99) 10-28 16:08:27.201: E/AndroidRuntime(664): at android.os.Looper.loop(Looper.java:137) 10-28 16:08:27.201: E/AndroidRuntime(664): at android.app.ActivityThread.main(ActivityThread.java:4424) 10-28 16:08:27.201: E/AndroidRuntime(664): at java.lang.reflect.Method.invokeNative(Native Method) 10-28 16:08:27.201: E/AndroidRuntime(664): at java.lang.reflect.Method.invoke(Method.java:511) 10-28 16:08:27.201: E/AndroidRuntime(664): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) 10-28 16:08:27.201: E/AndroidRuntime(664): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) 10-28 16:08:27.201: E/AndroidRuntime(664): at dalvik.system.NativeStart.main(Native Method) 10-28 16:08:27.201: E/AndroidRuntime(664): Caused by: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list' 10-28 16:08:27.201: E/AndroidRuntime(664): at android.app.ListActivity.onContentChanged(ListActivity.java:243) 10-28 16:08:27.201: E/AndroidRuntime(664): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:254) 10-28 16:08:27.201: E/AndroidRuntime(664): at android.app.Activity.setContentView(Activity.java:1835) 10-28 16:08:27.201: E/AndroidRuntime(664): at com.example.city.City.onCreate(City.java:35) 10-28 16:08:27.201: E/AndroidRuntime(664): at android.app.Activity.performCreate(Activity.java:4465) 10-28 16:08:27.201: E/AndroidRuntime(664): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049) 10-28 16:08:27.201: E/AndroidRuntime(664): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920) 10-28 16:08:27.201: E/AndroidRuntime(664): ... 11 more

© Stack Overflow or respective owner

Related posts about php

Related posts about android