Android Question Renamed a Class and now can't rename it back

Homerclese

Member
Licensed User
Longtime User
My project has a class called "Contact" with properties and methods, etc. I added the Phone library to my project to use one method, not realising that it also has a class called "Contact". B4A allowed two classes called "Contact" but prioritised the Phone library class which means calling my methods was now causing errors.

I renamed my "Contact" class to "myContact" just to find and resolve the issue. When I worked out what was going on, I decided to remove the Phone library (I didn't really need it).

So far so good. But...

Now when I try to rename my "myContact" class back to "Contact", B4A reports "File already exists. Cannot overwrite existing file." The "Contact" class (mine, not the one in the Phone library) is intrinsic to my app and I want it back! Is there a solution to this?
 

derez

Expert
Licensed User
Longtime User
Check the Contact.bas file in the project directory. If it is your class - delete the myContact class and add the Contact class (through the IDE menu).
 
Last edited:
Upvote 0

Homerclese

Member
Licensed User
Longtime User
Awesome, thank you derez. Chalk this up as just another newbie question from me. Thanks for being gentle. ;-)
 
Upvote 0

derez

Expert
Licensed User
Longtime User
Never be afraid of asking. From my experience - in many times phrasing the question and uploading it to the forum helps me find the answer by myself even before I get the response...
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…