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
Related
I am new to android things. Recently I tried to build an android things app on android studio 2.3.3 with 25 SDK.
But when I include the android things support library into the dependency of app module build.gradle file and sync with latest gradle changes,it gives me the below error :
"Install repository then Sync"
Plz Someone help me.
You don't need to connect Raspberry Pi to develop a Android Things project.
There are three points which you have to keep in mind while developing for Android Things:
Update your SDK tools to version 25.0.3 or higher.
Update your SDK with Android 8.0 (API 26) or higher.
In order to access new APIs for Things, you must create a project or modify an existing project that targets Android 8.0 (API level 26) or higher.
Add the library.
In your case, you need to install the latest bulid tools, and repositories to develop an Android Things Project.
Your build.gradle should look like this:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.android.androidthings.id"
minSdkVersion 21
targetSdkVersion 26
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:25.3.1'
provided 'com.google.android.things:androidthings:0.3-devpreview'
}
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).
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.
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
So I know that many other people had this problem, but mine is a little different. I've tried running my app on an LG G2 with Android 4.4.4, and a Note 3 with Android 4.4.2, but neither worked. I have installed the API 18, 19, and 20 SDKs.
Failure [INSTALL_FAILED_OLDER_SDK]
build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 'android-L'
buildToolsVersion "20.0.0"
defaultConfig {
applicationId "com.ween.control"
minSdkVersion 8
targetSdkVersion 'L'
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:19.+'
}
You can't test an Android-L app on a device with lower API.
Take a look here.
You need to make sure your dependencies are configured targeting the same sdk (also make sure the sdk is supported for the dependency).
As of version .11, the gradle plugin now uses the new manifest merger tool by default which you can use to avoid conflicting configurations when merging manifests from your dependencies while building by specifying <uses-sdk tools:node="replace" /> in your AndroidManifest.xml file.
http://tools.android.com/tech-docs/new-build-system/user-guide/manifest-merger
credit goes to Eddie Ringle
I was having a similar issue but my device sdk was 19 and it was looking for it to be 20. I changed the sdk from the file > Project Structure > SDK to 19 also I noticed when I was running it had the wear value selected in the top toolbar so I switched that to mobile and Voila.