2

我对 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 指定版本,但这也无济于事。任何指针?提前致谢。

4

1 回答 1

1

Notification.setLatestEventInfo在 API 级别 23 (Android 6.0) 中被删除: https ://developer.android.com/sdk/api_diff/23/changes/android.app.Notification.html

这里可以使用一些解决方案:如何实现通知的弃用方法

于 2016-02-01T14:34:44.787 回答