Unable to use breakpoints in Android Studio - android

I just installed the latest version of Android Studio, my computers OS is Windows 10 x64.
The problem is that for some reason Android Studio wont hit the breakpoints.. no matter if I use my nexus 10 with USB-debugging enabled, or if I use a VM.. however.. the app gets "published" to the selected device and launched.
This is my build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.xxxx.xxxx"
minSdkVersion 21
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled false
debuggable true
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
}
Any ideas?
I have Unity3D installed on the same machine but there is currently no process thats associated with Unity3D running.. and adb devices do list the connected device(s)..
I have also tried to run adb kill-server and adb start-server.. but that didnt do it either..
Br,
Inx

Related

my app is runing on android 5(api 22) but not work in android 4(api 16)

My Android App is good working on android 5 but when test app on other device(android 4) is crashing.
I did not use the special code.
Unfortunately my android studio is not have virtual device for api16 to see error log.
please help me.thanks
my gradle code:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.blogsky.delete.azbook"
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.1.1'
}
We can not know what make ur app crash without error log. Please install sdk 16 and setup virtual device, and post your error message here

adb backup with build tools v23 fails

I'm trying to view files saved to the internal sdcard on my Android device in order to debug my application.
I used to be able to use adb backup to this this. I just upgraded to Build Tools v23, and now when I try to run adb backup from Terminal in OSX, I get a 'Bus error: 10' response and no backup.
Any ideas?
This has been fixed in ADB Build Tools 23.0.1.
Check out your build.gradle file and make the changes as below,
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.0"
defaultConfig {
applicationId "com.example.inzi.app"
minSdkVersion 9
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.0.0'
}
Check for the compileSdkVersion (should be 23), buildTiilVersion (should be 23) and also the dependencies ('com.android.support:appcompat-v7:23.0.0')...
Let me know if it works...
And mark it as an answer so that it would be useful to others...

Android Studio doesn't read Samsung Galaxy S5

I installed all the latest SDK tools Android SDK Tools 24.3.3 and Android SDK Platform-tools 22,and unfortunaly android studio doesn't like my Samsung S5 Galaxy. It reads it as offline. You can see the picture.
I tried the adb commands kill-server and start-server but with no result. I also turned off and on the USB Debugging from the Developer Options..
This is my gradle file code just in case I did something wrong there. I have another device connected to my mac which is recongised and is online.
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "app.victory.walking.thewalkingviktory"
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), '
'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.1.1'
compile 'com.mcxiaoke.volley:library:1.0.15'
compile 'com.ganyo:gcm-server:1.0.2'
compile 'com.google.android.gms:play-services:7.5.0'
}
What could be wrong?
Just Switch Off your Phone, wait for few seconds and then again switch ON and then connect.
Install Samsung Kies then see if it is detecting or not.
See if debugging option is on or not in your phone.

getting Failure [INSTALL_FAILED_OLDER_SDK] while running my first android app

I am new to android and trying to run my first android app using Android Studio. My app is not getting installed in the emulator device and I am getting this message.
Failure [INSTALL_FAILED_OLDER_SDK]
After searching on net I found that this happens when the device has API level lower than that of the minSdkVersion. But that is not the case here. Following is my build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 'android-L'
buildToolsVersion "20"
defaultConfig {
applicationId "com.example.parikshit.myapp"
minSdkVersion 14
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:20.+'
}
The emulator device is Nexus 5 with KitKat version.I don't know what is wrong here.
Try using:
compileSdkVersion 20
And
targetSdkVersion 20

Android Studio minSdkVersion not working

The minSdkVersion directive in my build.gradle appears not to be working (Android Studio 0.8.2)
Here's the build.gradle for the "mobile" module:
apply plugin: 'com.android.application'
android {
compileSdkVersion 20
buildToolsVersion "20.0.0"
defaultConfig {
minSdkVersion 9
targetSdkVersion 20
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
wearApp project(':wear')
compile 'com.android.support:appcompat-v7:20.+'
compile 'com.google.android.gms:play-services-wearable:+'
}
When I try to debug it on my Samsung Galaxy S4 (API 19) I see this message in the "Compatible" column:
"No, minSdk(API 20) > deviceSdk(API 19)"
Minimum SDK should clearly be 9 as specified by the build.gradle. If I try to launch it anyway I get:
"Failure [INSTALL_FAILED_OLDER_SDK]"
I've scoured this project for any indication of something that could force the minSdk to 20. Nothing in AndroidManifest.xml. This project is a wearable app.
I've built another wearable app on the same machine and it loads and runs on the Samsung without a problem. This app that I'm trying to use was put together by a friend. It has only a small amount of code. The build.gradles are identical.
Totally baffled. Please help!
Android L version (SDK 20) will be overrides minSdkVersion to 20. You should change your build version to 19 or below version of SDK. for example,
apply plugin: 'com.android.application'
android {
compileSdkVersion 19
buildToolsVersion '19.1.0'
defaultConfig {
applicationId "example.myapplication"
minSdkVersion 14
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:support-v4:19.+'
}
Modify your build.gradle file like this, and resync your project and rebuild it.
also you should install 19.1 sdk libraries to using SDK Managers. Run android studio as administrator will be help to solve another problems when you install sdk and rebuild your project.
you can change compileSdkVersion 20 to compileSdkVersion 16 to have a try ,it works to me

Categories

Resources