Kivy和谷歌播放服务

Kivy和谷歌播放服务

本文介绍了Kivy和谷歌播放服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图用这个example

我不知道如果去上班。我下载了谷歌在SDK播放服务,但我不知道,我必须把它粘成的,我尝试过很多地方,但没有成功,总能获得

 错误:包com.google.android.gms.ads.AdView不存在

和其他包为好。我为我的Andr​​oid SDK中的无知道歉,但我想更好地了解它,所以我需要一些帮助。我需要知道我必须把'谷歌播放-services_lib'所以它会找到它。谢谢!

编辑:解决它,添加此为buildozer.spec

 #(列表)的Andr​​oid库项目中添加(将在加
自动#project.properties。)
android.library_references =库/谷歌播放services_lib

但仍得到一个错误:

  ... / Android的SDK-21 /工具/ ANT / build.xml文件:539:无法解析的项目目标的android-9'

下面是这一行:

 < getTarget方法
            androidJarFileOut =project.target.android.jar
            androidAidlFileOut =project.target.framework.aidl
            bootClassPathOut =project.target.class.path
            targetApiOut =project.target.apilevel
            minSdkVersionOut =project.minSdkVersion/> #线539!


解决方案

这解决为好,对不起,我在这里做,提出和回答我自己的问题的一塌糊涂,但我认为这是Kivy用户的一个重要课题,而且也没有太多这个在网络上。因此,解决方法:
我的Google Play-services_lib里面手动设置项目目标为Android的14'中'ant.properties'文件。它被扔的错误,因为谷歌Play服务库是新型Android API。

总之,对任何人好奇,如果是工作(落实到广告应用Kivy为Android),是它的工作,我不得不重写原来的解决方案,以支持新的图书馆,虽然(使用的指南)

I'm trying one approach of implementing ads into Kivy app using this example

I have no idea if its going to work. I downloaded Google Play services in SDK, but I have no clue where I have to stick it into, I tried many places, but unsuccessfully, always get

error: package com.google.android.gms.ads.AdView does not exist

and other packages as well. I apologize for my ignorance of android sdk, but I'm trying to understand it better, so I need some help. I need to know where I have to put 'google-play-services_lib' so it would find it. Thanks!

EDIT: solved it, adding this to 'buildozer.spec':

# (list) Android library project to add (will be added in the
# project.properties automatically.)
android.library_references = libs/google-play-services_lib

but still get an error:

.../android-sdk-21/tools/ant/build.xml:539: Unable to resolve project target 'android-9'

here is this line:

    <gettarget
            androidJarFileOut="project.target.android.jar"
            androidAidlFileOut="project.target.framework.aidl"
            bootClassPathOut="project.target.class.path"
            targetApiOut="project.target.apilevel"
            minSdkVersionOut="project.minSdkVersion" /> # line 539!!!
解决方案

And that solved as well, sorry for the mess I've made here, asking and answering my own questions, but I think it's an important topic for Kivy users, and there's not much about this on the net. So, solution:I manually set project 'target' to 'android-14' in 'ant.properties' file inside 'google-play-services_lib'. It was throwing error because the google play services library was for newer android api.

Anyway, for anyone curious if that worked (implementing ads into Kivy app for Android), YES it worked, I had to rewrite the original solution to support new library though (using this guide)

这篇关于Kivy和谷歌播放服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-01 15:31