问题
I tried to run my android app in a emulator using intelliJ 13
, and I configured the emulator to be a Nexus 4
running android 4.4.2
with ARM
cpu, and I got the follow errors:
Waiting for device.
"C:\Program Files (x86)\Android\android-sdk\tools\emulator.exe" -avd MyAVD0 -netspeed full -netdelay none
Device connected: emulator-5554
Device is online: emulator-5554
Target device: MyAVD0 [emulator-5554]
Uploading file
local path: C:\Users\daiyue\IdeaProjects\HelloDroid\out\production\HelloDroid\HelloDroid.apk
remote path: /data/local/tmp/com.example.HelloDroid
Adb Transfer Protocol Error.
No such file or directory
The following is my manifest.xml
:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.HelloDroid"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="19"/>
<application android:label="@string/app_name" android:icon="@drawable/ic_launcher">
<activity android:name=".MyActivity"
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>
The emulator showed nothing on screen as well, only when I pressed hardware button to switch on the emulator and only 'android' logo showed up and stayed forever.
I built the app using Android SDK 4.4.2 api
.
So the work around is to delete the MyAVD0
in C:\Users\username\.android\avd
, and recreate MyAVD0
again using Android AVD Manager
.
来源:https://stackoverflow.com/questions/21100834/adb-transfer-protocol-error-no-such-file-or-directory