更新:在我删除并重新安装包后,模拟器上只存在问题
我刚刚在我的windows 8笔记本上安装了android开发包。我正在尝试将第一个应用程序“hello world”(http://developer.android.com/training/basics/firstapp/creating-project.html)安装到我的nexus 7(2012)版本4.4.2,但它不起作用。
使用logcat查看器(在构建过程中),我可以看到它正在报告:
“无法加载memtrack模块(没有这样的文件或目录)”,后跟
“无法在运行时加载memtrack模块:-2。”
清单文件
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.myfirstapp"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="19" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.myfirstapp.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
控制台输出:
[2014-04-04 15:18:35 - myFirstApplication] Dx
trouble writing output: already prepared
[2014-04-04 15:18:43 - myFirstApplication] ------------------------------
[2014-04-04 15:18:43 - myFirstApplication] Android Launch!
[2014-04-04 15:18:43 - myFirstApplication] adb is running normally.
[2014-04-04 15:18:43 - myFirstApplication] No Launcher activity found!
[2014-04-04 15:18:43 - myFirstApplication] The launch will only sync the application package on the device!
[2014-04-04 15:18:43 - myFirstApplication] Performing sync
[2014-04-04 15:18:44 - myFirstApplication] Automatic Target Mode: using device 'mydeviceinfo'
[2014-04-04 15:18:44 - myFirstApplication] Uploading myFirstApplication.apk onto device 'mydeviceinfo'
[2014-04-04 15:18:44 - myFirstApplication] Installing myFirstApplication.apk...
[2014-04-04 15:18:47 - myFirstApplication] Success!
[2014-04-04 15:18:47 - myFirstApplication] \myFirstApplication\bin\myFirstApplication.apk installed on device
[2014-04-04 15:18:47 - myFirstApplication] Done!
"
我已经开始关注一个类似的帖子Couldn't load memtrack module Logcat Error但是我不知道我需要为这种情况做些什么
最佳答案
如果目标仿真器中有同一应用程序的较新版本(与manifest.xml中定义的版本代码相比),则会出现上述错误。
无法加载memtrack模块(没有这样的文件或目录)
未能加载memtrack模块:-2