I am trying to run my first android application in Android studio. Application created successfully with new project vizard but cant run that as getting this error--
Invalid App-Engine SDK Path
Please help
All answers about disabling the plugin are incorrect.
You need to execute ./gradlew appengineDownloadSdk in the root of your project. Alternatively you can execute the task via the gradle sidebar in Android Studio.
This task will create the folders given the current versions in your build.gradle file. You have to run this when you update versions in your dependency list.
One solution is to disable the Google Cloud Tools for Android Studio plugin.
In Android Studio, click on:
File > Settings
Then click on Plugins (on the left), and uncheck "Google Cloud Tools For Android Studio". Then Apply.
It asks you to restart Android Studio. Click on Restart and it will work now.
Seems like this is the problem--
exception in plugin Google cloud tools for android studio
After disabling this plugin its working now!!
In other scenario if you want to setup Google app engine this might help
https://stackoverflow.com/a/20986031/472336
I've created folder
c:\Users\[user_name]\.gradle\appengine-sdk\appengine-java-sdk-1.9.18\
And copy sdk that download there
https://cloud.google.com/appengine/downloads
So currently project compiles and works for me
Related
Today I've installed Android Studio Canary 1
Now I cannot run my app. This following dialog appears.
I've already set the right SDK location through File-> Project Structure-> Android SDK location.
Expecting your help to solve this problem.
Warning Dialog image:
Go to project structure settings and set Source Compatibility and Target Compatibility to your current java development kit version:
Just you need to sync your project file with your gradle file.
File -> Sync Project with Gradle Files
I tried every answer in this post but my problem only got resolved when I made these steps:
File -> Close project -> Remove project -> Open existing project (same
project)
Maybe this will save a morning to another person with the same bug.
EDIT
This happened to me a lot on a MacBook. After I posted this answer it just kept happening so what I did was:
uninstall the Android Studio version I had from the App Store;
download the desktop stable version from Android Studio website;
start using the desktop version of Android Studio.
Never happened again.
Sometimes the SDK path will be incorrectly configured. You would need to fix it.
To Settings/Preferences( command + , on mac).
Search for SDK
Under Android SDK, click on edit and point it the root of sdk directory on your file system. (If ther is no SDk installed then install in from the below list).
i suggest you go to build.gradle and sync again.
Or Tools -> Android -> Sync Project with Gradle Files (Android 3+)
You need to insall SDK api 19 check this out.
https://developer.android.com/studio/releases/platforms
Go to sdk manager and install sdk according to your device and check your device api. Example if your device is jellybean then install api 19 sdk.
Go to Tools> Android > SDK Manager and make sure you have selected default Setting under System Setting. In this image I have selected Android 7.1.1 as default SDK
Just click on the button ..."Sync Project with gradle file"
Error will be remove
I had the same problem and what it worked for me was just sync with gradle.
I just did what I've found in this similar question:
How do I "select Android SDK" in Android Studio?
The original answer:
go to build.gradle and click sync now. Then it worked.
Update :
File -> Sync Project with Gradle Files (Android Studio 3.1.1)
Tools -> Android -> Sync Project with Gradle Files (Android Studio
3.0.1) Or You can click on the icon from the toolbar.
Sync Project Icon
This answer may not help works for later version as Android studio Team work on making the tool more better, the way to sync may be
different in the next version of Android Studio.
COMMON WAY that may helps is try to sync project and then Invalidate
Caches and Restart Android Studio.
Solution for Android Studio 3.1.2
Before that, by the way, I had invalidated cache and restarted too, but it didn't work.
Please, try and let us know.
P.S.
I had this problem after I imported a project from Git, just in case someone would like to replicate.
I am using Android Studio 1.5.1 on windows 7 .I am not able to find the rebuild or clean option under the "Build" option?Is there any command to force rebuild or do it form the Android GUI?
The project was built in Eclipse and I have imported it in Android Studio.Earlier I was getting some error from google Play services which I have resolved by commenting the below line in the project.properties
target is android-23
android.library.reference.1=../../../../workspace/google-play-services_lib
Maybe there is something that you need to update before continuing to develop your project. Check on Help -> Check for Updates...
You should always keep Android Support Repository, Google Play Services, Google Repository, Android SDK Tools and Android SDK Platform-Tools updated.
I also encountered this problem and my Android studio was also latest version. As a workaround for this problem what I did was to open the module settings and changed values and reverted back to old values and click ok. After that those missing menu items appeared.
I am using AndroidStudio 1.2.2 and I have installed Google Go language plugin for IntelliJ Idea. I configure GOPATH and I compile and run first HelloWorld go in cmd, but i want to start learning make Android Go applications in AndroidStudio.
But when i want to run file test1.go i get error:
Error running test1.go: No Go Sdk defined for this project
I found on other forum to do this by:
File > Project Structure
but there I can only to add android/java library module and etc., (I add other java library modules, and google-play-services before).
I don't know too about Go SDK must to be:C:\Go or C:\Go\bin
If you haven't installed already, install one of the latest version from here: https://github.com/go-lang-plugin-org/go-lang-idea-plugin#pre-release-builds (either alpha or nightly).
Then you can simply point the SDK to C:\Go (if that's where the Go SDK is installed).
Hope it helps.
I am trying to get AdMob running. But for some strange reason, I can not get Android Studio to accept that the Google Repository is installed.
Thing is, it is installed in the SDK manager. And reinstalled multiple times now. Project Structure SDK path is the same as in Android SDK Manager.
When I mouse over the compile 'com.google.android.gms:play-services:6.+' line in my build.gradle, I get this tooltip:
"Dependency on Play Services, but the SDK installation does not have the "Extras > Google Repository" installed. Open the SDK manager and install it"
When I try to compile, this error:
Error:Failed to resolve: com.google.android.gms:play-services:6.+
With that error comes a link to install the Repository, which I used multiple times now. Android Studio does not care. Help.
edit: When I use a fresh empty project, it works, and Android Studio finds the Repository. No clue what is going on here.
I was suffering with the same problem and finally found a simple solution (I'm using Android Studio 1.5.1 on MacOS):
Go to File --> Project Structure
On the left hand of the opened window, under Developer Services, select Ads
Check the checkbox next to AdMod. Your window should look like this:
Click OK
This will add the required dependency to the Android's build.gradle, and sync Gradle.
When the sync is done, and just to make sure, clean and rebuild your project:
Build --> Clean Project
Build --> Rebuild Project
That's it! I hope this helps.
I've recently downloaded the Android Studio Bundle v0.3.2 for Windows, and now trying to complete the Google Maps Android API tutorial. There is a step which require to Click Sync Project with Gradle Files. I can't seem to find this button anywhere in Android Studio. Just in case here is a link of the Google Maps tutorial: Set Up Google Play Services SDK.
The Sync Project with Gradle option was added in Android Studio 0.4.0 and Android Studio is now on version 0.4.2 - make sure to check for updates within Android Studio (on Windows, it is the Help menu, then Check for update...)
There is a useful shortcut Ctrl + Shift + A, after which a window appears and you can type some command that you would like IntelliJ to run. Just type "sync" in there and it will find that command Sync Project with Gradle Files, even if it's not visible in the menu.