Android studio 3.0.1 problems??Possibly need to sync project with gradle files? - android-studio

Okay I've been trying to find the button to sync project with gradle files but I can't find it at all on android studio 3.0.1?Please help.Also I tried ctrl+shift+A and typing sync but clicking on the option didn't do anything?

May be you import your project incorrectly. Try to import again.
Also try to clean and rebuild project.
Or try Android Studio 3.1 stable

Related

How to use downloaded patch file of android studio again?

I was downloading an update for android studio. After the download was finished, there was some issue and the patch was not applied. Is there a way to use that downloaded file again? I don't want to download again because it will take a lot of time.
PS I'm using ubuntu.
To solve the “failed to apply patch” Android Studio problem you can follow these steps:
Move the Android SDK folder out of the Android Studio folder (quit Android Studio first).
Redo the Android Studio update process.
Once the update is complete, you will be prompted to enter the new location of the Android SDK.
If these steps do not work for you, update your Java runtime engine (JRE) and development kit (JDK) to the latest version. Alternatively, you could also just download the latest Android Studio build, install it (after renaming the folder of the previous build), and import your projects from the old buggy build.

Unknown Attribute Android: error on Android STUDIO 3.2.1

Things i have done to resolve this issue:
Clean Build & Rebuild
Deleted .idea file
Invalidated Caches/ Restart.. option
Turn On Power Save Mode.
SDk is up to date.
Sync Project with Gradle Files done.
Reinstall Android Studio done
recreate new project done
changed something in app Gradle file and synced the project again
android studio old version change also not help
Intellij shows to reset to default namespace, it will delete android namespace..
(In Project, Layout file corrections not reflecting into app)
Android Studio Version
Error Image
gradle image
Intelij Solution
This worked for me
Close Android studio
Delete all files from
C:\Users\.AndroidStudio3.2\system\caches
C:\Users\.AndroidStudio3.2\config //not importent
start android studio
Ran into the same issue. Seems to be something specifically related to Android Studio 3.2. My solution on Windows was to delete everything withing the cache/ folder in the .AndroidStudio3.2/ folder.
This problem happen for Android studio Cache & History.
Firstly In android studio go File -> Close Project and Exit Android Studio.
Then Delete below 2 Folders:
C:\Users\user-name.AndroidStudio3.X\system\caches
C:\Users\user-name.AndroidStudio3.X\config\terminal\history (optional)
Open the Android Studio and Enjoy!
Complete uninstall Android Studio (including system and cache files) and Reinstalling clears my bug...

How to import a android project into android studio?

I want to study the source code of android-smspopup .But when I download the source code and import this into android studio, the android studio pop up a dialog with a title"Import Gradle Project" and a blank to fill named Gradle home. Does any one know why this happens? And what to fill in Gradle home?
The source code doesn't include the Gradle wrapper files, which it should; the Gradle wrapper is responsible for automatically downloading the correct version of Gradle so you don't have to go through this trouble. I would recommend that you copy the Gradle wrapper over from another project into this source tree and use it. In another project that you've created with the New Project wizard, copy these files to the root directory of the project:
gradlew
gradlew.bat
gradle (directory)
When you open up the project in Android Studio it's likely to complain about the version of the Android Gradle plugin and offer to fix it for you; let it do that. If you're running the latest version of Android Studio (0.4.6 as of this writing), it's fairly smart about getting the versions of Gradle and the plug-in right, but in older versions it could get a little confused and have to ask you multiple times.
NOTE: instead of copying the wrapper files over, you can instead install a compatible version of Gradle and put the installation directory in when it asks for Gradle home. That will work, but be aware that Android Studio is very finicky about what version of Gradle it's compatible with; usually it requires a specific version that isn't forward-compatible, so for example, if it wants 1.10, 1.11 won't work. As you upgrade Android Studio you'll have to upgrade Gradle as well and it will be a bit of a drag; if you use the wrapper it's easier to make that change.
By the time Android Studio hits 1.0, it will sort out the version issues with Gradle, and it won't be so picky about version numbers, but in the short term, it's a limitation.

Android Studio project can't resolve ActionBarSherlock imports

I have an Android Studio project which has a dependency on ActionBarSherlock set in build.gradle:
dependencies {
compile 'com.actionbarsherlock:actionbarsherlock:4.4.0#aar'
compile project(':Core')
compile fileTree(dir: 'libs', include: '*.jar')
}
The project builds successfully on the command line with gradle assemble assembleDebug and also builds and runs just fine from the IDE when I press ctrl+D. When I view some of the Sherlock-related source files in the IDE, though, the file is full of red error notifications, starting with this line:
import com.actionbarsherlock.app.SherlockPreferenceActivity;
The tooltip that pops up says
Cannot resolve symbol 'SherlockPreferenceActivity'
and none of the context-sensitive stuff such as auto-completion is available.
I had tried the File > Invalidate Caches/Restart > Invalidate and Restart menu option, which doesn't seem to have cured the problem. How can I get Android Studio to correctly resolve this import?
First sync your project with gradle and check if it gives some error, if it worked fine go back and try importing something from actionbarsherlock library in any of your class.
If above step doesn't help. Check once Your_Project/your_module/build/exploded-bundles/ComActionbarsherlock.../classes.jar exists or not.
Then go for this :
Clean your project from Build > Clean Project, sync your project with gradle than check this for reference.
Import Google Play Services library in Android Studio
Or Follow the steps :
Exit Android Studio
Delete all the .iml files and files inside .idea folder from your project
Relaunch Android Studio and wait till the project synced completely with gradle
This is bug in Android Studio 0.4.2 and fixed for Android Studio 0.4.3 release.

Migrate project to Gradle

I've got a project that used to be in Eclipse. I've since moved it from there into Android Studio, though it's not using the Gradle build system yet.
I've setup my gradle files so that I can do gradlew build from the command-line and it will generate an APK for me.
My question now is how do I get Android studio to build using the gradle files that I've got setup instead of the using the "old" way?
For what it's worth, I'm on Windows 7.
Not sure how you are compiling the project with Android Studio without actually using Gradle because AFAIK Android Studio always uses Gradle under the hoods to build sources.
Anyway, if you have your Gradle config file ready you only have to import it to a new project in Android Studio (File > Import Project... and then select the build.gradle or settings.gradle)

Resources