how do call a class(mapview extending mapActivity) from another class?
I tried doing it by using Intent,but,i seem to get the following erro开发者_如何学Cr: 11-15 22:40:39.266: ERROR/dalvikvm(1589): Could not find class 'BlobCity.xyz.com.maps', referenced from method BlobCity.xyz.com.BlobCity$sendUserPass.onClick
where blobcity is my class that calls the maps class which contains the mapview.
This looks like a classloading or similar issue. It seems to be saying that one compiled Java class ("BlobCity.xyz.com.BlobCity.sendUserPass") contains a static dependency on another class ("BlobCity.xyz.com.maps"), but the class loader (or something) couldn't find the class file for the latter class.
(By the way, your choice of class and package names is pretty awful. You should try to stick to the standard naming conventions if you want other people to be able to understand your code.
- All class names ... including nested class names should be in "CamelCase".
- Package names should be all lowercase.
- Hierarchical package names should in reverse domain name order; e.g. "com.xyz.blobcity".
- You shouldn't use a random domain name without some kind of permission / authorization ... and there's no way that I'll believe that you work for "xyz.com"!)
Try using :
<application ...>
<uses-library android:name="com.google.android.maps" />
...
...
</application>
in your AndroidManifest.xml, I have the same problem before and adding <uses-library android:name="com.google.android.maps" />
solve the problem
精彩评论