There's no perfect solution. Even Apple's iOS has issues like this, but on a far smaller scale. If your app is very popular or good, it will be cracked. I'd say consider it a compliment.
Of course, using standard libraries for licensing is always a bad idea, because crackers can simply re-use their cracking tools for every application that was built using the same library. Implement your own licensing library, which will make cracking your app a lot harder.
Interesting fact: Apple's OS X App Store also has a licensing system built-in, but developers have to write their own libraries to use it. This way crackers can't crack multiple applications simultaneously, because every application has a different implementation of the licensing system.