Android application developers try to embed ad libraries in their programs to gain revenue,however,the wide-spread introduction of ad libraries increases the risk of user privacy leakage.In order to accurately and automatically identify the em-bedded ad libraries,a semantic-based method for detecting ad libraries in Android applications is proposed from the perspective of static analysis.The method uses meta-information to identify main and non-main modules,then semantic features are extracted for non-main modules,and finally a classical machine learning approach is used to train an ad library detection classifier.Experimen-tal validation is conducted on Andrzoo's public dataset,and the results show that the method achieves a recall of 99.2%and is ap-plied to Android Market ad library detection,obtaining an accuracy of 97%.