错误:包com.google.android.gms.ads不存在 [英] error: package com.google.android.gms.ads does not exist
问题描述
我的Android应用程序都运行良好(API 15),直到我想包括谷歌的广告。
虽然谷歌播放-services.jar在我的项目库,它包含com.google.android.gms.ads,调试器自带了一个错误:当使用包com.google.android.gms.ads不存在:
My Android app did work well (API 15) untill I wanted to include Google ads. Although google-play-services.jar is in my project library and it contains com.google.android.gms.ads, the debugger comes up with an error: package com.google.android.gms.ads does not exist when using:
import com.google.android.gms.ads.*;
我试了几种解决方案,但他们没有工作。
我是从Android的4.03 API15变更为谷歌API15但没有改变。
我在做什么错了?
I tried several solutions, but none of them worked. I changed from Android 4.03 API15 to Google API15 but nothing changed. What am I doing wrong?
推荐答案
您必须导入谷歌播放-services_lib位于该文件夹中<$c$c><android-sdk-directory>/extras/google/google_play_services/libproject/google-play-services_lib$c$c>并宣布它作为您的项目库。
You must import google-play-services_lib that is located in the folder <android-sdk-directory>/extras/google/google_play_services/libproject/google-play-services_lib
and declare it as library of your project.
您会发现设置谷歌Play服务SDK 更多的信息
这篇关于错误:包com.google.android.gms.ads不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!