Before attempting to glue metal to plastic, it's important to know what types of adhesives can accomplish the task. Not all adhesives are alike -- wood glue and school glue, for instance, are designed for porous materials and would not work well on either metal or plastic. Certain glues that are designed for plastics won't work well on metals, and vice versa. Tube-based epoxies and two-part epoxy putties are generally able to handle sticking metal to plastic. These types of adhesives take a while to cure and work better if the items are clamped together during the drying time.
Tube-based epoxies that stick metal to plastic are often very odoriferous, requiring adequate ventilation or outdoor use. These are packaged in toothpaste-style tubes and are often clear like silicone. There are many brands available; look for something favored by jewelers, jewelry crafters, auto mechnics or crafters who build miniature models. This type of adhesive often has a long curing time. The plastic and metal should be clamped or otherwise secured after adhesion. Watch for and wipe away adhesive that squirts out between the pieces after pushing them together.
Two-part Epoxy Putty
Epoxy putty looks a bit like modeling clay when removed from the package. Many brands feature two different putty sticks that become an adhesive when you knead them together, but some feature one color putty wrapped around another in one stick. The activation process -- kneading -- is the same either way. This type of epoxy is incredibly strong and can be used to patch holes, besides acting like a glue. Since this is a putty and not a liquid, it is harder to use where an extremely thin glue layer is needed. It can also be used to adhere metal to plastic by wrapping around both pieces -- something liquid glue cannot do.
Surface Preparation and Curing.
Glues need a good, clean surface for proper adhesion. If gluing smooth metal and smooth plastic together, clean and dry both pieces to remove any oils or residues first. Scuff any shine off the areas to be glued with sandpaper or steel wool. Once you've applied the glue per the package instructions and have pressed the pieces together, clamp them securely together for a while. Glue failures happen when items aren't tightly pressed together or if the surfaces aren't clean. These simple preparations reduce the chance of having to reglue your project later.
Don't Guess -- Ask
If you have an adhesive that you know to be strong, you could always test it in an inconspicuous area of your two project pieces, following the package instructions. Don't do this if the package specifically says not to use it on metal, for instance, or plastic. Some adhesives appear to melt or "eat" plastic, so be mindful of this when attempting to use the glue you have on hand. If all else fails, visit an auto parts store and ask for a metal-to-plastic adhesive -- they most likely carry something that will work. A craft or jewelry store is another option.