Classifier based on deep learning has greatly improved the ability of identifying malware. However, these detectors may be affected by adversarial input disturbances. Any vulnerability in the malware detector may pose a significant threat to the platform they protected. Therefore, in order to improve the defense against malware and adversarial examples, we conducted the study on adversarial deep learning for Android malware. On this basis, this paper proposes a new method to improve the robustness of the malware detector which is based on visualizing and deep learning. Different from the traditional method with feature extraction, this paper first converts the malware binaries of the Android application package into grayscale images and use the Generative Adversarial Network (GAN) to optimize the boundary samples. Then conduct adversarial training to generate a robust malware detector based on deep learning. A large number of experiments have proved that this method can resist different attacks without occupying too many resources. The results show that it has significant advantages compared with other current classifiers.