0

Android Studio can't start debug my app. It's outputs message ScreenShot

My AndroidManifest.xml file

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  package="com.xxx" >

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<application
    android:debuggable="true"
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@style/AppTheme"
    tools:ignore="HardcodedDebugMode">
    <activity android:name="com.xxx.MainContentActivity" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity android:name="com.xxx.ViewerActivity" />

    <meta-data
        android:name="com.google.android.gms.version"
        android:value="@integer/google_play_services_version" />
</application>

My Gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"
    defaultConfig {
        applicationId "com.xxx"
        minSdkVersion 14
        targetSdkVersion 23
        versionCode 2
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.3.0'
    compile 'com.android.support:design:23.3.0'
    compile 'com.android.support:recyclerview-v7:23.3.0'
    compile 'com.android.support:cardview-v7:23.3.0'
    compile 'com.google.android.gms:play-services:8.4.0'
}

I try clean/rebuild gradle project, Restart Android Studio, Invalidate cache, and rebbot ADB Integration (Tools -> Android -> Disable ADB Integration -> Enable ADB Integration)

Any ideas?

P.S. Before this I changed the name of the application package

P.S.{2} Android Studio can't debug other projects.

Amit Vaghela
  • 22,772
  • 22
  • 86
  • 142
Nikita G.
  • 720
  • 1
  • 14
  • 22
  • remove android:debuggable="true" from manifest application tag... uninstall app from device(if previously installed)... then try again. – Arnav M. May 20 '16 at 13:11
  • I did everything you said. The result is the same :( @ArnavM. – Nikita G. May 20 '16 at 13:23
  • is it working on simulator/emulator or other device? – Arnav M. May 20 '16 at 14:41
  • I haven't other devices at moment and emulator not installed, but I noticed, that Android Studio can't debug other projects. Now I update AS to version 2.1.1 and try again. Also *gragle build* process not started, when i click icon debug, only show error message @ArnavM. – Nikita G. May 20 '16 at 14:47
  • share your gradle version, gradle-android plugin version and java version. – Arnav M. May 20 '16 at 14:50
  • Gradle is 2.12 (in old projects - 2.10). JDK - 1.8. I think it's in the renaming of the package. Previously, it was all right because. The new draft does not want to create a better restore old, but AS does not want him to debug run.@ArnavM. – Nikita G. May 20 '16 at 15:01
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/112524/discussion-between-nikita-g-and-arnav-m). – Nikita G. May 20 '16 at 15:02

2 Answers2

1

Do following steps:

Navigate to Tools --> android --> disable adb integration and again enable it

after that unpluged USB from device and again plugged.

Debug again.

checkout this link

hope this helps.

Community
  • 1
  • 1
Amit Vaghela
  • 22,772
  • 22
  • 86
  • 142
0

After two days, I found the only way out of my situation.Android Studio debugging only new projects. Therefore it was necessary to remove the old project with the modified package name (code stored), create a new project with the desired package name and restore code. Thank you all for your answers and help.

Nikita G.
  • 720
  • 1
  • 14
  • 22