Android Studio doesn't read Samsung Galaxy S5 - android

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.

Related

Android Studio will not recognize Google Glass, however ADB will

I have a problem with my google glass'.
It will not register in android studio as a device, but when I run "adb devices" in terminal it finds the device and list it as "device".
Android studio says "please configure Android SDK". I have everything installed, API 19 Glass Development kit, API 19 in general, Google usb driver, etc.
Compile Sdk Version points to API 19 aswell,
build tools version 23.0.3.
Library respository: jcenter, flatDir { dirs 'prebuilt-libs' }
My gradle is pointing the right way:
apply plugin: 'com.android.application'
repositories {
jcenter()
flatDir {
dirs 'prebuilt-libs'
}
}
android {
compileSdkVersion "Google Inc.:Glass Development Kit Preview:19"
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.example.thinknick.myapplication"
minSdkVersion 19
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'])
}
I'm at ends here, I have tried reinstalling Android studio, restarting ADB, restarting the computer, change USB ports, re-plug the device, other USB ports, etc.
The envoirnment is windows 10 64-bit. The cable I know to work, because it works on a colleagues mac.
I found the solution, and I'm afraid it was too obvious for me too see for several hours. I ran Android studio as administrator, and it runs perfectly now.
walk of shame

Unable to use breakpoints in Android Studio

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

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 wear handled device offline

I am working since a few days on an app for my wearable device but since yesterday, i see my device offline.
my graddle file looks like that :
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion '23.0.0'
defaultConfig {
applicationId "com.example.ile14017.moto360"
minSdkVersion 21
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.google.android.support:wearable:1.2.0'
compile 'com.google.android.gms:play-services-wearable:7.5.0'
}
I tried to reset my handled device, that didn't change anything. It could be coming from my sdk tools (wrong version used?).
your gradle - File is not related to your device state. What get's displayed in your IDE is basically the output of the adb (Android Debug Bridge). So the display of your devices in the IDE is the output of adb list devices. You could restart the adb by using
adb kill-server
adb start-server
Also you can use adb list devices to see if your device is mentioned where.
As I am not into wearables I don't know if you got to turn on development options there again. On some systems it's importend that the USB vendor id is known, e.g. Linux (udev).

Trouble setting up Hello, World watch app in Android Studio

When deploying the wear version of the included Hello, World watch app in Android Studio I get this error:
Failure [INSTALL_FAILED_OLDER_SDK]
Update: Removing details about trying a hacked version of L from the Reddit post as that was not a solution for me and it may have created more confusion.
mobile/build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 20
buildToolsVersion "20.0.0"
defaultConfig {
applicationId "com.example.erikbabel.myapplication"
minSdkVersion 15
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:19.+'
compile 'com.google.android.gms:play-services-wearable:+'
}
wear/build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 20
buildToolsVersion "20.0.0"
defaultConfig {
applicationId "com.example.erikbabel.myapplication"
minSdkVersion 20
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'])
compile 'com.google.android.support:wearable:+'
compile 'com.google.android.gms:play-services-wearable:+'
}
Everything else is untouched from the New Project directions. I'm running on my Moto Ultra 4.4 and the LG G watch.
The error [INSTALL_FAILED_OLDER_SDK] is because I was deploying the wear gradle build to the phone (which has an incompatible api). In order to deploy the wearable gradle build to the LG G watch, you have to enable bluetooth debugging and connect your adb to the watch. Then select the watch in the Choose Device dialog.
OP has solved this issue, noting that a wearable app can be deployed directly to the wearable device for debugging, but not to a phone. The other option is to package the wearable app inside of a handheld app and deploy the handheld app to the phone. This will then cause the wearable app to be deployed to the wearable device paired with the phone. As of writing this, this is the only method to include a wearable app in the Play Store.
When publishing to users, you must package a wearable app inside of a handheld app, because users cannot browse and install apps directly on the wearable. If packaged properly, when users download the handheld app, the system automatically pushes the wearable app to the paired wearable.
Note: This feature doesn't work when you are signing your apps with a debug key when developing. While developing, installing apps with adb install or Android Studio directly to the wearable is required.
Source: https://developer.android.com/training/wearables/apps/packaging.html

Categories

Resources