linked gradle projects: Nothing to show - android

How do I solve this problem?
in android studio
sitting>Build ,Excution, Deployment> Build Tools> Gradle
Linked Gradle projects:Nothing to show

Related

project Root project "Gradle project not found for Module: "MyApplication"

My new Android studio version is giving below error for the sample project could you please help?
Below is the logs for IDE Fatal Error i got
IDE Error
Root project path of the Gradle project not found for Module: 'MyApplication2'
com.intellij.openapi.diagnostic.Logger$EmptyThrowable
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:140)
at org.jetbrains.plugins.gradle.execution.GradleOrderEnumeratorHandler.addCustomModuleRoots(GradleOrderEnumeratorHandler.java:110)
at com.android.tools.idea.gradle.project.AndroidGradleOrderEnumeratorHandlerFactory$1.addCustomModuleRoots(AndroidGradleOrderEnumeratorHandlerFactory.java:93)
at com.intellij.openapi.roots.impl.OrderEnumeratorBase.addCustomRootsForModule(OrderEnumeratorBase.java:422)
at com.intellij.openapi.roots.impl.OrderRootsEnumeratorImpl.collectModuleRoots(OrderRootsEnumeratorImpl.java:238)
at com.intellij.openapi.roots.impl.OrderRootsEnumeratorImpl.lambda$computeRoots$0(OrderRootsEnumeratorImpl.java:108)
at com.intellij.openapi.roots.impl.OrderEnumeratorBase.processEntries(OrderEnumeratorBase.java:303)
at com.intellij.openapi.roots.impl.ModuleOrderEnumerator.forEach(ModuleOrderEnumerator.java:47)
at com.intellij.openapi.roots.impl.OrderRootsEnumeratorImpl.computeRoots(OrderRootsEnumeratorImpl.java:104)
at com.intellij.openapi.roots.impl.OrderRootsEnumeratorImpl.getRoots(OrderRootsEnumeratorImpl.java:74)
at com.intellij.openapi.roots.OrderEnumerator.getClassesRoots(OrderEnumerator.java:159)
Because of this error Gradle build is getting failed Gradle error screen shot attached
Also in Project structure required files are not getting generated
for example: Application specific build.gradle Project structure picture attached
PS: Android studio version is 3.1.4
I had the same problem and solved it by below methods.
I don't know what OS you are running, but mine is macOS High Sierra, and
Android Studio version is same as yours. (v 3.1.4)
First thing I tried, and it worked.
I changed the gradle version to 4.2 and re-opened the project.
File -> Project Structure -> Project -> Gradle version from 4.4 to 4.2
I changed the gradle version from 4.2 to 4.4 again.
I closed the project and re-opened it after I deleted the gradle on the below directory.
/Users/$USERNAME/.gradle/wrapper/dists/GRADLE_VERSION

gradle error in unity exported android project

I am going to use the build config property "multiDexEnabled true" to break 64K methods limit following link
https://developer.android.com/studio/build/multidex.html#about
I update to use unity 5.6.1f1 and android studio 2.3.3. I set "build system" option to "Gradle(New)", which is new added from 5.5, then click "Export" to create an android project.
I open the exported project with android studio, then I get the following error
I try the two blue links, but I keep geting this same result.
For my unity project, I only create an empty project and add a button to a unity scene, then export it. I have also tried to build API directly, it works.
It is important for me to export unity project to andoid studio project, because it can help us to use additional compile options
Do any one know what I miss? Or how to export unity project correctly?
Thanks
The gradle error text, if cannot see the image link
Error:org.gradle.api.internal.tasks.DefaultTaskInputs$TaskInputUnionFileCollection cannot be cast to org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection
Possible causes for this unexpected error include:Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
I had the same issue with unity 2017.1.0b4 and Android Studio 2.3.3, gradle 3.3.
You should change android plugin for graddle version in Android studio to 2.3.3
You can specify the Android plugin for Gradle version in either the
File > Project Structure > Project menu in Android Studio, or the
top-level build.gradle file. The plugin version applies to all modules
built in that Android Studio project. The following example sets the
Android plugin for Gradle to version 2.3.3 from the build.gradle file:
buildscript {
...
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
}
}
https://developer.android.com/studio/releases/gradle-plugin.html
Check your local gradle version in directory -
C:\Users\yourname\.gradle\wrapper\dists
Modify your project gradle configuration -
project\gradle\wrapper\gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip
Make sure gradle-3.3-all match to your gradle version.
If you have wasted a lot of time fixing unity Gradle error but nothing worked then you tried unity internal builder but that gave "Parsing Package error"
then try this, it will not help you make your project using unity's Gradle but it will make your project without any error successfully.
Export your project from unity to a folder eg: ProjectName_Gradle.
open android studio, make sure you are connected to the internet .
close current project then select "Open Gradle, eclipse ADT, etc;" option and open ProjectName_Gradle folder.
check the version of buildTools installed in your android-SDK by opening android-SDK settings from the android studio itself.
edit "build.gradle" file under Gradle Scripts section or under your project.
and change "buildToolsVersion" to the latest version installed in your SDK.
then click "syn project with Gradle Files" from file option and let it sync.
it may ask to update Gradle version, then click update
now there should not be any errors.
now try building APK.

Could not determine the class-path for interface com.android.builder.model.AndroidProject

When I import an Eclipse project into Android Studio, I got this problem:
Gradle 'XNote' project refresh failed
Error:Could not determine the class-path for interface com.android.builder.model.AndroidProject.
Anyone knows why it happened? Thanks!
Just now i am facing the same problem.
1.Check classpath in build.gradle file.
change to
classpath 'com.android.tools.build:gradle:2.3.0'
then go to gradle-wrapper.properties, and change distributionUrl
distributionUrl=http://services.gradle.org/distributions/gradle-3.3-all.zip
and then rebuild the project. its help for me...
I think this will definitely helps you.
I have solved this problem.
Google doesn't update ADT any more, so when Eclipse export a project to gradle, it use an old gradle plugin version that Android Studio doesn't support.
First, you should check the version of gradle plugin that you have installed.
Open Android Studio's installation directory,then open the directory \gradle\m2repository\com\android\tools\build\gradle\, you will see all version you have installed.
Then open Android Studio, open tab 'Project -> Gradle Scripts', Edit file build.gradle, change the gradle plugin to newest version you have installed, such as 2.3.0:
[OPTIONAL] This step is not necessary, but if you do not do this, you may see this problem:
A problem occurred evaluating root project 'XXX'.
> org/gradle/initialization/BuildCompletionListener
Check the newest version of gradle you have installed at C:\Users\YOUR USER NAME\.gradle\wrapper\dists.
Then open tab 'Project -> Gradle Scripts', edit file gradle-wrapper.properties, modify the gradle version(attention: gradle, NOT gradle plugin) to the newest at the last line.
Finally, click Build - Clean Project, done!
If it still warning "Gradle project sync failed...", just click Try Again!
AT THE END, SOMEBODY HELP ME TO TRANSLATE MY ANSWER TO REAL ENGLISH THAT NO grammatical mistakes!!!
Just Update two things:-
1) Update your Build.gradle to
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
2) Update Gradle-wrapper.properties: (Change Android mode > Project mode then Extend Gradle and open Gradle-wrapper.properties)
Replace distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip
By
distributionUrl=http://services.gradle.org/distributions/gradle-3.3-all.zip
This always resolves the issue. may it usefull for you
I got it working after upgrading build tools to version 25.0.0 in build.gradle:
buildToolsVersion '25.0.0'
And change project to use newest gradle version 3.3 with default gradle wrapper (File -> Settings -> Gradle)
In my case I removed folder .idea from the project and then restarting the studio automatically manages to all the required folder and gradle work.
First, delete your .gradle folder in the home directory then restart Android Studio.
Palanivelraghul was right. A Studio has to download the old version. Then it presented 3 different options after it was complete.
Choose the top option ~"Sync with 3.0.1".
Event Log:
Gradle sync started > Project setup started > Gradle sync finished > Executing tasks:
[:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar] > Gradle build finished.

Gradle project refresh failed with empty error

Ok so that's a first..
After upgrading to Android Studio 1.5.1 and updating Gradle (on a Mac).
I'm getting an empty error and it refuses to build.
Gradle 'MyTaskTeam' project refresh failed, Error:
AS highlighted the "dependencies" part in my build file, so maybe it's a hint?
I experienced a similar error after upgrading to 1.5.1. The problem was caused by my Gradle settings being configured to "Use local gradle distribution". I had to switch to "Use default gradle wrapper (recommended)" in several projects to fix it.
This setting is under File -> Settings (Ctrl+Alt+S) under Build, Execution, Deployment -> Build Tools -> Gradle

Failed to refresh Gradle project

I am using android studio 0.4.2 and I am facing the problem..
Here is the error.
Failed to refresh Gradle project 'epilepticapp'
You are using Gradle version 1.10, which is not supported. Please use version 1.9.
Please point to a supported Gradle version in the project's Gradle settings or in the
project's Gradle wrapper (if applicable.)

Categories

Resources