I get a Gradle Sync error saying "Failed to set up SDK": Error: Module 'app': platform 'Google Inc.:Glass Development Kit Preview:19' not found.
I have Glass Development Kit Preview from Android API 19 installed. My build.gradle(Module: app) is updated to reflect that:
compileSdkVersion 'Google Inc.:Glass Development Kit Preview:19'
buildToolsVersion '25.0.0'
I've looked at similar problems and I seem to have my build.gradle set up properly. How can I get the Gradle Sync to recognize my GDK?
You can try using the base build Tools for GDK:
android {
compileSdkVersion "Google Inc.:Glass Development Kit Preview:19"
buildToolsVersion "19.1.0"
}
Download Android 4.4.2 or API 19.
Or try using this link . It creates a new project of GDK, and you can check how gradle looks afterwards.
Related
what can i do in this situation? In Android Studio 4, I'm seeing this issue: The specified Android SDK Build Tools version (28.0.3) is ignored, as it is below the minimum supported version (29.0.2) for Android Gradle Plugin 4.0.0. Android SDK Build Tools 26.0.2 will be used.
Change your buildToolsVersion to '29.0.2' in build.gradle file.
As on version Android 4.1.2 it says remove buildToolsVersion "28.0.2" from your build.gradle file since it has its own default build tools now and just Sync it. It worked for me.
While integrating Flutter in Android studio getting error as * Error running Gradle: Unable to download needed Android SDK components, as the following licenses have not been accepted: Android SDK Build-Tools 26.0.2, Android SDK Platform 27 To resolve this, please run the following command in a Terminal: flutter doctor --android-licenses
Problem was with sdk path in local.properties. By default its pointing to different location. It works for me when change android sdk home dir in sdk.dir
I'm an Android newbie tasked with creating a simple app for Google Glass XE23.
I have downloaded & installed Android Studio 3.0.1, but find nothing in it related to Glass.
ALL search results are old and refer to much older versions of AS. That includes anything I find at Google's Glass developer's site.
The AS Messages window contains:
Gradle 'gdk-apidemo-sample' project refresh failed
Error:failed to find target Google Inc.:Glass Development Kit Preview:19 : C:\Users\Allan\AppData\Local\Android\Sdk
How/where do I get the GDK package?
In the Android Sdk Manager make sure to check Show Package Details. Then you see all package options and can install the GDK easily.
Android SDK Manager can be found at Settings > Appearance & Behavior > System Settings > Android SDK.
Something that worked for me was going to the apps build.gradle file and changing the compileSdkVersion to "Google Inc.:Glass Development Kit Preview:19". Android Studio should throw an error and prompt you to install the module using component installer.
Here's what that looks like:
compileSdkVersion "Google Inc.:Glass Development Kit Preview:19"
You should get a prompt after trying to sync the gradle files again.
Android Studio doesn't redirect me to API sources correctly. When I hit any function it decompiles .class file bytecode instead of accessing the right file from sdk/sources tree.
Hitting "download" and "refreshing" options does nothing. It's particularly annoying for implementing listeners since it generates functions' headers without variables' manes from documentation (i.e. var1, var2 etc.). I have installed API 23 (SDK platform, tools, docs, sources). I have set compile and target SDK to 23.
I tried to reinstall SDK tools, update AS from canary channel, invalidate cache but nothing helped so far.
I switched to API 21 and it works fine.
What am I missing?
My build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '23.0.2'
defaultConfig {
applicationId "com.myapp.app"
minSdkVersion 10
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
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.squareup.picasso:picasso:2.5.2'
compile project(':volley')
compile 'com.jakewharton:butterknife:7.0.1'
}
Below you can find gradle output for a blank project (without 3rd party libs) with the same API 23 set and the same behaviour.
Executing tasks: [clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies]
Configuration on demand is an incubating feature.
Incremental java compilation is an incubating feature.
:clean
:app:clean
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2330Library
:app:prepareComAndroidSupportAppcompatV72330Library
:app:prepareComAndroidSupportDesign2330Library
:app:prepareComAndroidSupportRecyclerviewV72330Library
:app:prepareComAndroidSupportSupportV42330Library
:app:prepareComAndroidSupportSupportVectorDrawable2330Library
:app:prepareDebugDependencies
:app:compileDebugAidl
:app:compileDebugRenderscript
:app:generateDebugBuildConfig
:app:mergeDebugShaders
:app:compileDebugShaders
:app:generateDebugAssets
:app:mergeDebugAssets
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources
:app:mergeDebugResources
:app:processDebugManifest
:app:processDebugResources
:app:generateDebugSources
:app:preDebugAndroidTestBuild UP-TO-DATE
:app:prepareDebugAndroidTestDependencies
:app:compileDebugAndroidTestAidl
:app:processDebugAndroidTestManifest
:app:compileDebugAndroidTestRenderscript
:app:generateDebugAndroidTestBuildConfig
:app:mergeDebugAndroidTestShaders
:app:compileDebugAndroidTestShaders
:app:generateDebugAndroidTestAssets
:app:mergeDebugAndroidTestAssets
:app:generateDebugAndroidTestResValues UP-TO-DATE
:app:generateDebugAndroidTestResources
:app:mergeDebugAndroidTestResources
:app:processDebugAndroidTestResources
:app:generateDebugAndroidTestSources
:app:mockableAndroidJar
:app:preDebugUnitTestBuild UP-TO-DATE
:app:prepareDebugUnitTestDependencies
BUILD SUCCESSFUL
Apparently this issue has been fixed in Android Studio 2.1.
Rerun the Android SDK Manager setup in Android Studio and this should solve your issue.
In Android Studio:
Windows: File -> Settings (ctrl+alt+s) -> Appearance & Behavior -> System Settings ->
Android SDK.
Mac: Android Studio -> Preferences (cmd + ,) -> Appearance & Behavior -> System Settings -> Android SDK.
Click on Edit on the right of the Android SDK location.
Click Next all the way through the wizard and this should fix the problem.
This was answered here for a different question.
For people facing the same problem, the solution is in this post for Linux and in the same topic here for Windows (thanks to Aamir Abro). Basically, you have to edit jdk.table.xml file for API level you are missing. I don't know why, but Android 2.0 and 2.1 RC don't have filled <root type="composite" /> in <sourcePath>. I updated sources' path <root type="simple" url="file://D:/android/sdk/sources/android-23" /> and now it works.
For Windows user file location: C:\Users{USER_NAME}.AndroidStudio2.0\config\options\jdk.table.xml
For Linux user file location: ~/Library/Preferences/AndroidStudioBeta/options/jdk.table.xml
Edit:
For some people resetting SDK location helped source.
As qbeck mentioned in his comment, resetting the path to the SDK fixed the issue for some of us.
Solution:
Android Studio 2.1 reporting in: solved the issue by resetting SDK.
Preferences -> Appearance & Behavior -> System Settings -> Android
SDK.
Click on Edit to the right of Android SDK location. Next, next, next
to complete the wizard and voila!
Encountered the same problem for API level 28 on Android Studio 3.2.1 on Windows 10. Refresh did not work.
Worked after restarting Android Studio.
to update your Android Studio to Api 23 go to :
Tools > Android > SDK Manager,
you can go then go to SDK Tools tab or click on Launch Sdandalone SDK Manager. check Android SDK Build-tools 23.0.2 to install
Update:
please, remove from your dependencies:
compile project(':volley')
and replace it with :
compile 'com.android.volley:volley:1.0.0'
There would be 2 errors sometimes, the first would say: 'platform android 28 not found', click next, 'accept some license agreement...'. Once you accept the agreement, both the errors will disappear.
I'm using Android Studio to build a Glass app, with my SDK Manager updated to GDK Preview API 19 Revision 9, and my device is on XE 21.3. I'm trying to use the new CardBuilder class, but it isn't available. I can still use the deprecated Card class, but the new stuff just won't show up.
I even uninstalled/reinstalled the Android 4.4.2 packages, but nothing. The same occurs when I load the project in Eclipse, too. I'd like to not use the Card class, as this is for a demo tutorial.
Got any tips on how to force this?
It took me several minutes before Android Studio was able to recognise the new class. You shall delete the build folder and start a clean compilation. There is a problem with classes already compiled with previous version of the GDK which are not noticed for recompilation.
Mine finally got repaired...today's Android SDK update to 23.0.5 seemed to do the trick...that and playing with the External Libraries menu in the Project panel to make sure the new class was available and then manually adding the namespace. Whew.
Thanks for your help everybody! :)
I thought it might be that but it's the same as the Google SDK Sample Projects, but here's what I've got:
apply plugin: 'com.android.application'
repositories {
jcenter()
flatDir {
dirs 'prebuilt-libs'
}
}
android {
compileSdkVersion 'Google Inc.:Glass Development Kit Preview:19'
buildToolsVersion "20.0.0"
defaultConfig {
minSdkVersion 19
targetSdkVersion 20
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
}
This is why I've stuck with Eclipse for Glass development. Android Studio has been too flaky again and again... I do use Android Studio for standard Android development