为sdk 1.6编译Android相机应用程序

发布于 2024-09-14 18:11:31 字数 1776 浏览 8 评论 0原文

我正在尝试编译并运行 sdk 1.6(也称为API 级别 4 或 Donut 版本)。

虽然 AndroidManifest 中没有 minSdkVersion,但它显然不能在甜甜圈设备上运行。事实上,如果使用 sdk 2.2 进行编译,相机将在使用 sdk 1.6 的 avd 或 G1 上崩溃并出现 NoSuchMethodError 执行。

我也尝试检查 [donut-release] 标签,但是,奇怪的是,它甚至不会编译,并给出许多错误,例如:

[javac] /home/mrucci/camtest2/src/com/android/camera/ImageManager.java:41: cannot find symbol
[javac] symbol  : class DrmStore
[javac] location: package android.provider
[javac] import android.provider.DrmStore;
[javac]                         ^
[javac] /home/mrucci/camtest2/src/com/android/camera/Util.java:32: cannot find symbol
[javac] symbol  : class MediaMetadataRetriever
[javac] location: package android.media
[javac] import android.media.MediaMetadataRetriever;
[javac]                      ^
[javac] /home/mrucci/camtest2/src/com/android/camera/MenuHelper.java:29: cannot find symbol
[javac] symbol  : class ExifInterface
[javac] location: package android.media
[javac] import android.media.ExifInterface;
....
[javac]                      ^
[javac] /home/mrucci/camtest2/src/com/android/camera/ActionMenuButton.java:81: cannot find symbol
[javac] symbol  : variable mScrollX
[javac] location: class com.android.camera.ActionMenuButton
[javac]                           mScrollX + mRight - mLeft),
[javac]                           ^
[javac] /home/mrucci/camtest2/src/com/android/camera/ActionMenuButton.java:81: cannot find symbol
[javac] symbol  : variable mRight
[javac] location: class com.android.camera.ActionMenuButton
[javac]                           mScrollX + mRight - mLeft),

特别是,我真的不明白为什么 ExifInterface 自 API 级别 5 以来引入,用于“donut”标签中。我是否遗漏了什么?

I am trying to compile and run the Android Camera for sdk 1.6 (also called API level 4 or Donut release).

While there is no minSdkVersion in the AndroidManifest, it clearly does not run on a donut device. In fact, if compiled with sdk 2.2 the camera will crash with a NoSuchMethodError execption on an avd or a G1 with sdk 1.6.

I tried also checking out the [donut-release] tag, but, strangely, it won't even compile giving many errors like:

[javac] /home/mrucci/camtest2/src/com/android/camera/ImageManager.java:41: cannot find symbol
[javac] symbol  : class DrmStore
[javac] location: package android.provider
[javac] import android.provider.DrmStore;
[javac]                         ^
[javac] /home/mrucci/camtest2/src/com/android/camera/Util.java:32: cannot find symbol
[javac] symbol  : class MediaMetadataRetriever
[javac] location: package android.media
[javac] import android.media.MediaMetadataRetriever;
[javac]                      ^
[javac] /home/mrucci/camtest2/src/com/android/camera/MenuHelper.java:29: cannot find symbol
[javac] symbol  : class ExifInterface
[javac] location: package android.media
[javac] import android.media.ExifInterface;
....
[javac]                      ^
[javac] /home/mrucci/camtest2/src/com/android/camera/ActionMenuButton.java:81: cannot find symbol
[javac] symbol  : variable mScrollX
[javac] location: class com.android.camera.ActionMenuButton
[javac]                           mScrollX + mRight - mLeft),
[javac]                           ^
[javac] /home/mrucci/camtest2/src/com/android/camera/ActionMenuButton.java:81: cannot find symbol
[javac] symbol  : variable mRight
[javac] location: class com.android.camera.ActionMenuButton
[javac]                           mScrollX + mRight - mLeft),

In particular, I really do not understand why ExifInterface is used in the "donut" tag when it has been introduced since API level 5. Am I missing something?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

过度放纵 2024-09-21 18:11:31

其中一些类通过 @hide 注释对 sdk 隐藏。因此,只有拉下​​并构建所有 aosp 才能构建。

https://github.com/ android/platform_frameworks_base/blob/donut-release/media/java/android/media/MediaMetadataRetriever.java

Some of these classes are hidden from the sdk with the @hide annotation. So you can only build if you pull down and build all of aosp.

https://github.com/android/platform_frameworks_base/blob/donut-release/media/java/android/media/MediaMetadataRetriever.java

向日葵 2024-09-21 18:11:31

您是否尝试使用最新版本?它利用了一大堆新的 API,并且很难在低于其目标的 API 4 级别上工作。不过,此处的修订版应该仅编译美好的。

Are you trying to use the latest revision? It takes advantage of a whole bunch of new APIs and would be very difficult to get working on an API 4 levels below its target. The revision at here, however, should compile just fine.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文