Building and Running on a device from Android Studio -
to run application on device think have ensure app. debuggable setting android:debuggable attribute of <application> element true in build.gradle file, (as says in doc. http://developer.android.com/tools/building/building-studio.html) how file looks like:
// top-level build file can add configuration options common sub-projects/modules. buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:1.2.3' // note: not place application dependencies here; belong // in individual module build.gradle files } } allprojects { repositories { jcenter() } }
you targeting wrong build.gradle (top level). need in lower level build.gradle in android block:
android { //... buildtypes { debug { debuggable true } customdebuggablebuildtype { debuggable true } release { debuggable false } } //... } also can done in old way adding android:debuggable="true" androidmanifest.xml file in <application section.
Comments
Post a Comment