使用Buildozer构建时出错

时间:2015-10-07 09:30:51

标签: ant kivy buildozer

我对Kivy和Android应用开发相当新。我用Kivy做了一个基本的hello world应用程序,并试图用Buildozer从它制作一个APK。这些是我看到的错误:

-compile:
[javac] Compiling 11 source files to /home/ratul/Devel/Python/Kivy/test/.buildozer/android/platform/python-for-android/dist/ratulsapp/bin/classes
[javac] /home/ratul/Devel/Python/Kivy/test/.buildozer/android/platform/python-for-android/dist/ratulsapp/src/org/renpy/android/PythonService.java:64: error: cannot find symbol
[javac]         notification.setLatestEventInfo(context, serviceTitle, serviceDescription, pIntent);
[javac]                     ^
[javac]   symbol:   method setLatestEventInfo(Context,String,String,PendingIntent)
[javac]   location: variable notification of type Notification
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] 1 error

BUILD FAILED
/home/ratul/Devel/Android/Sdk/tools/ant/build.xml:716: The following error occurred while executing this line:
/home/ratul/Devel/Android/Sdk/tools/ant/build.xml:730: Compile failed; see the compiler error output for details.

我不明白问题的来源。我尝试从main.py指定版本,但这也没有帮助。有什么指针吗?提前谢谢。

1 个答案:

答案 0 :(得分:1)

在API级别23(Android 6.0)中删除了

Notification.setLatestEventInfohttps://developer.android.com/sdk/api_diff/23/changes/android.app.Notification.html

这里使用一些解决方案:How to implement the deprecated methods of Notification