eclipse 由于 APK 文件无效,安装失败?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7230757/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 16:55:32  来源:igfitidea点击:

Installation failed due to invalid APK file?

androideclipseapk

提问by dev0ina

I just downloaded an example program of AR in metaio. When I run or build the program. The error displayed: Installation failed due to invalid APK file! [2011-08-29 21:15:30 - Example_SDK] Please check logcat output for more details. [2011-08-29 21:15:30 - Example_SDK] Launch canceled!

我刚刚在metaio中下载了一个AR的示例程序。当我运行或构建程序时。显示错误:由于 APK 文件无效,安装失败![2011-08-29 21:15:30 - Example_SDK] 请检查 logcat 输出以了解更多详细信息。[2011-08-29 21:15:30 - Example_SDK] 发布取消!

Here is the logcat. I have read other issues regarding on this matter but it still did not work including making sure the phone and sdk target device version is the same.

这是日志猫。我已经阅读了有关此事的其他问题,但它仍然不起作用,包括确保手机和 sdk 目标设备版本相同。



08-29 21:15:00.186: VERBOSE/LocationManagerService(102): _removeUpdates: listener = Receiver{44aa7230 Intent PendingIntent{44bd8348: PendingIntentRecord{44aa6930 com.google.android.apps.maps startService}}}
08-29 21:15:00.206: DEBUG/TrafficAppWidgetUpdateService(1165): No longer requesting location updates.
08-29 21:15:05.846: DEBUG/UsbConnectionSettings(1188): -enableChargeOnly()
08-29 21:15:05.846: INFO/global(1188): Default buffer size used in BufferedReader constructor. It would be better to be explicit if an 8k-char buffer is required.
08-29 21:15:05.856: DEBUG/UsbConnectionSettings(1188): usb_cable_connect = 1
08-29 21:15:05.916: DEBUG/UsbConnectionSettings(1188): -onPause()
08-29 21:15:06.056: INFO/LSState(102): EventReceiver:android.intent.action.NOTIFICATION_ADD
08-29 21:15:06.206: WARN/InputManagerService(102): Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@44ea6148 (uid=10005 pid=1188)
08-29 21:15:06.896: DEBUG/UsbConnectionSettings(1188): -onStop()
08-29 21:15:06.896: DEBUG/UsbConnectionSettings(1188): -onDestroy()
08-29 21:15:14.076: DEBUG/dalvikvm(1188): GC_EXPLICIT freed 1940 objects / 164512 bytes in 115ms
08-29 21:15:27.726: DEBUG/TrafficAppWidgetUpdateService(1165): Got widget id to update: 20
08-29 21:15:27.746: DEBUG/TrafficAppWidgetUpdateService(1165): Scheduled update for 20 in 29 s.
08-29 21:15:27.756: WARN/TrafficAppWidgetUpdateService(1165): Requested widget update, but no data found for id: 20
08-29 21:15:27.766: VERBOSE/LocationManagerService(102): _removeUpdates: listener = Receiver{44aa5aa8 Intent PendingIntent{44d17750: PendingIntentRecord{44aa6930 com.google.android.apps.maps startService}}}
08-29 21:15:27.776: DEBUG/TrafficAppWidgetUpdateService(1165): No longer requesting location updates.
08-29 21:15:28.526: DEBUG/TrafficAppWidgetUpdateService(1165): Got widget id to update: 25
08-29 21:15:28.526: DEBUG/TrafficAppWidgetUpdateService(1165): Scheduled update for 25 in 29 s.
08-29 21:15:28.536: WARN/TrafficAppWidgetUpdateService(1165): Requested widget update, but no data found for id: 25
08-29 21:15:28.556: DEBUG/TrafficAppWidgetUpdateService(1165): No longer requesting location updates.
08-29 21:15:28.556: VERBOSE/LocationManagerService(102): _removeUpdates: listener = Receiver{44d1b8f8 Intent PendingIntent{44cb74e0: PendingIntentRecord{44aa6930 com.google.android.apps.maps startService}}}
08-29 21:15:29.574: INFO/wpa_supplicant(170): CTRL-EVENT-STATE-CHANGE id=22 state=6
08-29 21:15:29.576: VERBOSE/WifiMonitor(102): Event [CTRL-EVENT-STATE-CHANGE id=22 state=6]
08-29 21:15:29.576: INFO/wpa_supplicant(170): WPA: Group rekeying completed with 00:26:5a:cb:c8:73 [GTK=TKIP]
08-29 21:15:29.576: INFO/wpa_supplicant(170): CTRL-EVENT-STATE-CHANGE id=22 state=7
08-29 21:15:29.576: VERBOSE/WifiStateTracker(102): Changing supplicant state: COMPLETED ==> GROUP_HANDSHAKE
08-29 21:15:29.586: VERBOSE/WifiMonitor(102): Event [WPA: Group rekeying completed with 00:26:5a:cb:c8:73 [GTK=TKIP]]
08-29 21:15:29.586: VERBOSE/WifiMonitor(102): Event [CTRL-EVENT-STATE-CHANGE id=22 state=7]
08-29 21:15:29.596: VERBOSE/WifiStateTracker(102): Changing supplicant state: GROUP_HANDSHAKE ==> COMPLETED
08-29 21:15:32.836: DEBUG/dalvikvm(350): GC_EXPLICIT freed 1942 objects / 105944 bytes in 99ms
08-29 21:15:37.856: DEBUG/dalvikvm(581): GC_EXPLICIT freed 2758 objects / 105040 bytes in 111ms
08-29 21:15:40.119: VERBOSE/AlarmManager(102): Alarm triggering: Alarm{44e30020 type 2 com.google.android.location}
08-29 21:15:40.136: DEBUG/WifiService(102): acquireWifiLockLocked: WifiLock{NetworkLocationProvider type=2 binder=android.os.Binder@44c729f8}
08-29 21:15:40.146: DEBUG/WifiService(102): enable and start wifi due to updateWifiState
08-29 21:15:40.146: VERBOSE/AlarmManager(102): Adding Alarm{44f62eb0 type 2 com.google.android.location} Jan 01 08:25:58 am
08-29 21:15:41.036: INFO/wpa_supplicant(170): CTRL-EVENT-SCAN-RESULTS  Ready
08-29 21:15:41.066: DEBUG/LocationMasfClient(102): getNetworkLocation(): Returning cache location with accuracy 50.0
08-29 21:15:41.496: DEBUG/dalvikvm(1172): GC_FOR_MALLOC freed 4875 objects / 483848 bytes in 110ms
08-29 21:15:41.576: VERBOSE/LocationManagerService(102): _removeUpdates: listener = Receiver{44dfe9e8 Intent PendingIntent{44d7c620: PendingIntentRecord{44dfe990 com.google.android.apps.maps startService}}}
08-29 21:15:42.666: WARN/LocationMasfClient(102): uploadCollectionReport(): no ReplyElement
08-29 21:15:43.966: DEBUG/dalvikvm(1180): GC_FOR_MALLOC freed 5896 objects / 403016 bytes in 106ms
08-29 21:15:44.446: DEBUG/dalvikvm(1172): GC_FOR_MALLOC freed 8146 objects / 419664 bytes in 114ms
08-29 21:15:45.147: VERBOSE/AlarmManager(102): Alarm triggering: Alarm{44f62eb0 type 2 com.google.android.location}
08-29 21:15:45.166: VERBOSE/AlarmManager(102): Adding Alarm{44a76a50 type 2 com.google.android.location} Jan 01 08:26:53 am
08-29 21:15:45.176: DEBUG/WifiService(102): releaseWifiLockLocked: WifiLock{NetworkLocationProvider type=2 binder=android.os.Binder@44c729f8}
08-29 21:15:45.186: DEBUG/WifiService(102): enable and start wifi due to updateWifiState
08-29 21:15:56.746: DEBUG/TrafficAppWidgetUpdateService(1165): Got widget id to update: 20
08-29 21:15:56.756: DEBUG/TrafficAppWidgetUpdateService(1165): Scheduled update for 20 in 29 s.
08-29 21:15:56.776: WARN/TrafficAppWidgetUpdateService(1165): Requested widget update, but no data found for id: 20
08-29 21:15:56.806: DEBUG/TrafficAppWidgetUpdateService(1165): No longer requesting location updates.
08-29 21:15:56.806: VERBOSE/LocationManagerService(102): _removeUpdates: listener = Receiver{44e5c5b0 Intent PendingIntent{44b54330: PendingIntentRecord{44aa6930 com.google.android.apps.maps startService}}}
08-29 21:15:57.536: DEBUG/TrafficAppWidgetUpdateService(1165): Got widget id to update: 25
08-29 21:15:57.556: DEBUG/TrafficAppWidgetUpdateService(1165): Scheduled update for 25 in 29 s.
08-29 21:15:57.566: WARN/TrafficAppWidgetUpdateService(1165): Requested widget update, but no data found for id: 25
08-29 21:15:57.596: VERBOSE/LocationManagerService(102): _removeUpdates: listener = Receiver{44e873d8 Intent PendingIntent{44b781c8: PendingIntentRecord{44aa6930 com.google.android.apps.maps startService}}}
08-29 21:15:57.606: DEBUG/TrafficAppWidgetUpdateService(1165): No longer requesting location updates.
08-29 21:16:03.556: DEBUG/AndroidRuntime(1305): >>>>>>>>>>>>>> AndroidRuntime START 

----

I really have no idea what is the problem.

我真的不知道有什么问题。

回答by arsalank2

The metaio Mobile SDK is only supported on armeabi-v7a. There will be a native ABI mismatch if you try to install the APK on a device that does not support armeabi-v7a.

metaio Mobile SDK 仅在 armeabi-v7a 上受支持。如果您尝试在不支持 armeabi-v7a 的设备上安装 APK,将会出现本机 ABI 不匹配。

回答by Guillaume Raymond

I have exactly the same problem as you. From what I understand, I need to run ndk on the librairy since the problem of Native ABI mismatch can be solved that way (found that while Googleing it)

我和你有完全一样的问题。据我了解,我需要在库上运行 ndk,因为原生 ABI 不匹配的问题可以通过这种方式解决(在谷歌搜索时发现)

Here's the output of logcat (if it can help us with the issue) :

这是 logcat 的输出(如果它可以帮助我们解决问题):

11-15 20:27:45.858: D/PackageParser(59): Scanning package: /data/app/vmdl36057.tmp
11-15 20:27:46.628: D/PackageManager(59): Scanning package com.metaio.example
11-15 20:27:46.639: I/PackageManager(59): /data/app/com.metaio.example-1.apk changed;  unpacking
11-15 20:27:46.658: W/PackageManager(59): Native ABI mismatch from package file
11-15 20:27:46.658: W/PackageManager(59): Package couldn't be installed in /data/app/com.metaio.example-1.apk
11-15 20:27:46.758: D/dalvikvm(59): GC_EXPLICIT freed 8795 objects / 479824 bytes in 97ms
11-15 20:27:46.838: D/AndroidRuntime(195): Shutting down VM
11-15 20:27:46.838: D/jdwp(195): adbd disconnected
11-15 20:27:46.848: I/AndroidRuntime(195): NOTE: attach of thread 'Binder Thread #3' failed