The error clearly states that there is no layout_width attribute defined one of the elements in main.xml, check RelativeLayout in main.xml. Also in the future please post only the relevant parts of the logcat, I've removed the unnecessary portion for you this time...
Thanks guys and sorry bout that here is some update code that I have done and I seem to be having some issues with thread permissions/management. I added the Looper.prepare() which an error told me was missing and that I needed in order to create a handler within the new thread. The layout_width I noticed just after I posted the code, but thanks. I posted [relevant] LogCat. Anyway, here is the updated code:
There is too much code to process, all the layout info is not needed again as now the problem is not related to it. You must have some idea where the exception is getting raised. Please post only the part of the code that is causing the problem. You have a better chance of getting a response in that case...
Life is easy because we write the source code.....
posted 10 years ago
ok sorry bout all that. I just included in case needed. Basically, as you see, there are no problems in the strings.xml or mail.xml. The error seems to be coming from permissions not being allowed to certain threads. I have created only two threads, the main UI thread and an additional getLocThread to process getting locations. You can view the latest posts before for all details but here is the simplification and I will give the gist first:
I created the main UI (obv auto) I then created a Runnable called updateLocTV to send with the handler mCallback back to the main thread from the getLocThread used to run all of this OUTSIDE of UI thread. I am getting errors involving permissions that you can see inside of LogCat. I just noticed [in LogCat] that the Package Manager doesnt recognize permissions I added into the manifest. I added a few more permission just now during debugging and none of them are recognized.
The error arises when the locationManager requests updates
lm = (LocationManager)getSystemService(Context.LOCATION_SERVICE);
on line 138 below in Main.java
Now, here is the code for:
LogCat <-- all errors and warnings displayed, nothing else
not sure if you need any other quick reference but, here are a few
onCreate -------------------- line 61
final Handler mCallback --- line 76
Runnable updateLocTV ---- line 78
getLocThread --------------- line 118
where error occurs --------- line 138
# 08-10 18:26:23.916: WARN/PackageManager(52): Unknown permission andoid.permission.INTERNET in package com.sunynpcs.GPSex2
# 08-10 18:26:23.938: WARN/PackageManager(52): Unknown permission andoid.permission.SEND_SMS in package com.sunynpcs.GPSex2
# 08-10 18:26:23.948: WARN/PackageManager(52): Unknown permission andoid.permission.ACCESS_FINE_LOCATION in package com.sunynpcs.GPSex2
# 08-10 18:26:23.967: WARN/PackageManager(52): Unknown permission andoid.permission.ACCESS_COARSE_LOCATION in package com.sunynpcs.GPSex2
# 08-10 18:26:23.977: WARN/PackageManager(52): Unknown permission andoid.permission.ACCESS_NETWORK_STATE in package com.sunynpcs.GPSex2
posted 10 years ago
Lester you are my hero!! It now works!! well, at least it ready for my further development. Thanks SOO much. I dont know if I will need all the permissions I added to get around the security issue but I will leave them anyway for now. Thanks again. I am not going to worry yet about the other warnings more posts and new threads coming I am sure :-/
Do you want ants? Because that's how you get ants. And a tiny ads: