Android 无法加载 memtrack 模块(没有这样的文件或目录)

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22862929/
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-08-20 06:30:30  来源:igfitidea点击:

Couldn't load memtrack module (No such file or directory)

androideclipseandroid-layoutandroid-sdk-tools

提问by user3209603

Update: After I removed and reinstalled bundle problem only remains on emulator

更新:在我删除并重新安装捆绑包后,问题只存在于模拟器上

I've just installed the android development bundle on my windows 8 laptop. I'm trying to install the first app "hello world" (http://developer.android.com/training/basics/firstapp/creating-project.html) to my Nexus 7 (2012) version 4.4.2 but its not working.

我刚刚在我的 Windows 8 笔记本电脑上安装了 android 开发包。我正在尝试将第一个应用程序“hello world”(http://developer.android.com/training/basics/firstapp/creating-project.html)安装到我的 Nexus 7(2012)版本 4.4.2,但它不是在职的。

Using the logcat viewer (whilst the build is taking place) I can see it is reporting:

使用 logcat 查看器(在构建过程中)我可以看到它正在报告:

"Couldn't load memtrack module (No such file or directory)" followed by " failed to load memtrack module: -2 at run time."

“无法加载 memtrack 模块(没有这样的文件或目录)”后跟“未能加载 memtrack 模块:-2 在运行时。”

manifest.xml

清单文件

<?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>

Console output:

控制台输出:

[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!
"

I've started looking at a similar post Couldn't load memtrack module Logcat Errorbut i can't see what i would need to do for this situation

我已经开始查看类似的帖子无法加载 memtrack 模块 Logcat 错误,但我看不到在这种情况下我需要做什么

回答by zhijuexu

If there is a newer version (compare to the version code defined in your manifest.xml) of the same Application in the target emulator, you will get error as you mentioned.

如果目标模拟器中有相同应用程序的更新版本(与 manifest.xml 中定义的版本代码相比),您将收到您提到的错误。

Couldn't load memtrack module (No such file or directory)
failed to load memtrack module: -2

无法加载 memtrack 模块(没有这样的文件或目录)
未能加载 memtrack 模块:-2

回答by Amol Suryawanshi

I faced this error several days ago. if your real device or emulator already contains older version of application you are trying to run, then uninstall this old version and run again.It has resolved my issue.

几天前我遇到了这个错误。如果您的真实设备或模拟器已包含您尝试运行的旧版本应用程序,请卸载该旧版本并再次运行。它已解决了我的问题。

回答by Mario Eraso

I was facing the same issue, make sure you're running the project in the right emulator, sometimes Eclipse doesn't ask you about the emulator that it will use.

我遇到了同样的问题,请确保您在正确的模拟器中运行项目,有时 Eclipse 不会询问您将使用的模拟器。

Go to the Run menu, Run Configurations, in the left list pick Android Application and then the application that you're trying to run. In the left panel pick the "Target" tab and choose the option "Always prompt to pick device" and try to run again.

转到运行菜单,运行配置,在左侧列表中选择 Android 应用程序,然后选择您尝试运行的应用程序。在左侧面板中,选择“目标”选项卡并选择“始终提示选择设备”选项,然后再次尝试运行。

Make sure to pick the right emulator, in my case I had recently installed blue stacks and Eclipse was trying to run the application on it without prompting me, instead running it on the regular emulator.

确保选择正确的模拟器,就我而言,我最近安装了蓝色堆栈,Eclipse 试图在没有提示的情况下在其上运行应用程序,而是在常规模拟器上运行它。

回答by psycho11

I got the same error because of a missing Semicolon in the java file ";". So do check for proper closing of the code Statements

由于 java 文件“;”中缺少分号,我遇到了同样的错误。所以一定要检查代码语句的正确关闭