【问题标题】:Error while building with Buildozer使用 Buildozer 构建时出错
【发布时间】:2015-10-07 09:30:50
【问题描述】:

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

【问题讨论】:

    标签: ant kivy buildozer


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 2019-07-30
      • 2022-10-23
      • 2020-10-03
      • 2016-12-21
      • 1970-01-01
      • 2022-06-14
      • 1970-01-01
      • 1970-01-01
      • 2016-11-03
      相关资源
      最近更新 更多