Status Update
Comments
uc...@google.com <uc...@google.com>
xa...@google.com <xa...@google.com>
sr...@google.com <sr...@google.com> #2
The message is incorrectly generated by using File#getAbsoluetPath with "gradle/wrapper/gradle-wrapper.properties". Depending on the OS and the user settings this can have different results, from the getAbsolutePath documentation:
/**
* Returns the absolute pathname string of this abstract pathname.
*
* <p> If this abstract pathname is already absolute, then the pathname
* string is simply returned as if by the <code>{@link #getPath}</code>
* method. If this abstract pathname is the empty abstract pathname then
* the pathname string of the current user directory, which is named by the
* system property <code>user.dir</code>, is returned. Otherwise this
* pathname is resolved in a system-dependent way. On UNIX systems, a
* relative pathname is made absolute by resolving it against the current
* user directory. On Microsoft Windows systems, a relative pathname is made absolute
* by resolving it against the current directory of the drive named by the
* pathname, if any; if not, it is resolved against the current user
* directory.
*
* @return The absolute pathname string denoting the same file or
* directory as this abstract pathname
*
* @throws SecurityException
* If a required system property value cannot be accessed.
*
* @see java.io.File#isAbsolute()
*/
The message should generate the path based on the project folder instead.
It is worth noting that in newer versions we process this error differently and show a quick fix for this and a couple of links to the correct locations (see attached image for an example), but the error message generated in the exception is still incorrect.
sr...@google.com <sr...@google.com> #3
Android Studio 4.1 Beta 4 and 4.2 Canary 5 will have the correct path in the message from the plugin exception and should also provide a quick fix.
lb...@gmail.com <lb...@gmail.com> #4
@3 Hopefully they could create a new project and run it. Not like what we have today:
Description
Version of Gradle Plugin:
Version of Gradle:
Version of Java:
OS:
Android Studio 4.1 Canary 8
Build #AI-193.6911.18.41.6423924, built on April 23, 2020
Runtime version: 1.8.0_242-release-1644-b01 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0
GC: ParNew, ConcurrentMarkSweep
Memory: 7954M
Cores: 12
Registry: ide.new.welcome.screen.force=true, debugger.watches.in.variables=false
Non-Bundled Plugins: String Manipulation, org.jetbrains.kotlin, ignaciotcrespo.github.com.vector-drawable-thumbnails, org.intellij.plugins.markdown
Steps to Reproduce:
1. Open the attached project.
2. Notice it fails to build.
The bug is that it tells me to update gradle file in illogical place, and it doesn't even exist there:
* What went wrong:
An exception occurred applying plugin request [id: 'com.android.application']
> Failed to apply plugin [id 'com.android.internal.version-check']
> Minimum supported Gradle version is 6.4-rc-2. Current version is 5.2.1. If using the gradle wrapper, try editing the distributionUrl in C:\android\Android Studio\jre\jre\bin\gradle\wrapper\gradle-wrapper.properties to gradle-6.4-rc-2-all.zip
I tried to remove the ".gradle" folder in the project itself, but it keeps creating "5.2.1" folder inside, instead of a more updated one.