2016-08-20 140 views
0

安装应用程序我有运行的是Android 4.4.2 它工作得很好,直到几个星期去我开始这个问题,Android Studio中无法安装一个三星Galaxy S5设备该应用程序后,我按运行和构建gradle这个Android的工作室无法在设备

其他信息:我试图上emulatir运行应用程序的第一次工作,我做了一些修改后,我试图在模拟器上再次运行,但变化被应用了noy

这是gradle这个文件:

apply plugin: 'com.android.application' 

android { 
compileSdkVersion 23 
buildToolsVersion "23.0.2" 

defaultConfig { 
    applicationId "com.incorp.anisvikernes.appex" 
    minSdkVersion 19 
    targetSdkVersion 19 
    versionCode 1 
    versionName "1.0" 
} 
buildTypes { 
    release { 
     minifyEnabled false 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
    } 
} 
} 

dependencies { 
compile fileTree(dir: 'libs', include: ['*.jar']) 
testCompile 'junit:junit:4.12' 
compile 'com.android.support:appcompat-v7:23.4.0' 
compile 'com.android.support:design:23.4.0' 
compile 'com.android.support:support-v4:23.4.0' 
compile 'com.android.support:cardview-v7:23.1.0' 
} 

这是logcat的:

03:49:45 Executing tasks: [clean, :app:generateDebugSources,  :app:generateDebugAndroidTestSources, :app:prepareDebugUnitTestDependencies, :app:mockableAndroidJar, :app:compileDebugSources, :app:compileDebugAndroidTestSources, :app:compileDebugUnitTestSources] 
03:51:04 Gradle build finished in 1m 18s 412ms 
05:23:54 Executing tasks: [:app:assembleDebug] 
05:28:19 Gradle build finished in 4m 25s 153ms 
05:28:32 Error during Sync: An existing connection was forcibly closed by the remote host 
05:28:32 Session 'app': Error Installing APK 

这是

08/20 05:28:26: Launching app 
$ adb push D:\projects\appex\app\build\outputs\apk\app-debug.apk /data/local/tmp/com.incorp.anisvikernes.appex 
java.io.IOException: An existing connection was forcibly closed by the remote host 
Error while Installing APK 
+0

重建,清理和重新运行 – VVB

+0

无效缓存重新启动。 –

+0

VVB这不是一个永久的解决方案,它不会一直工作,@Shahail Zahid请问我该怎么做?其下方的项目设置为 –

回答

0

我居然发现,修正了这个问题的解决方案,它会显得非常奇怪和奇怪,但后更新我的司机(Win键+ X - >设备管理器 - >去我的设备,然后按更新按钮)我更改了用于将手机连接到我的电脑的USB电缆,它立即工作

0

我通过

解决同一问题的错误
1. Disable USB debugging and developer options 
2. Disconnect the device from USB 
3. Re enable USB debugging and developer options 
4. Reconnect device 

有人说当时我遇到了问题,并重新启动了adb。

+0

这没有奏效,我试图从任务管理器和终端杀死adb,但我仍然有同样的问题 –

-1

经过几个小时的没有成功,删除USB延长线为我工作。 除了正如您所描述的安装APK程序之外,任何使用USB扩展电缆的东西都可以使用。也许其他人可以通过将USB电缆更换为短而稳定的工作电缆来解决这个问题。

相关问题