Gradle Build Fails with 2 errors #2
Labels
No labels
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
bug
documentation
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ironriders/ScoutingApp#2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Followed instructions for how to fix some build problems ("No resource found that matches the given name") by installing the newest preview version of Android Studio. Fixed problems with building blue-alliance-api by directly pulling it and then manually moving it to the ScoutingApp folder.
We expected that the build errors would be resolved, allowing the project to be built, and letting us continue with the app development.
However, the same build errors from before occurred and the Gradle build failed again. The problem is with the AndroidManifest.xml file in blue-alliance-api, but any attempts to fix it haven't worked. Currently, the laptop that these errors are occurring with is the only laptop we have available to develop the app, so we would like it to work as soon as possible.
Two-ish questions:
Also, make sure that the
AndroidManifest.xmlyou're editing is not one of the manifests in a build directory; editing one of these files will not have any effect. You can tell these apart a couple of ways:The first error that comes up says "No resource found that matches the given name (at 'label' with value '@string/module_name')." I remember the error verbatim, but as far as I could find within any area of the project, 'module_name' only appears in the AndroidManifest.xml file for blue-alliance-api. It is surrounded by other unresolved errors that do not appear in the console, but that say "Attribute not allowed here" when hovered over. As far as I found through research, thsee errors are caused by the "No resource found..." error.
I've tried editing every .xml file that has '@string/app_name' to include a statement that has 'module_name' and I've tried to switch 'module_name' so that it matches somewhere else, but none of these worked. From what other users have said, the error might have something to do with the libraries/file path, and some people have resolved it by "cleaning and rebuilding" the project, but I couldn't find any resource that says how to do that in this version (or the version I was using before) of Android Studio. I only updated AS this afternoon, and I undid any changes I made around 'module_name'.
The second error that comes up when the Gradle build fails is a longer one that I can remember the full content of, but that is still visible when looking at the build failed terminal in Android Studio. It is something about the libraries and the URI used to access them (schemas.android...). When hovering over the URI at the top of the Manifest, it simply says "URI is not registered." From what I found again, this has to do with the directories and file paths, but trying to move or change the directories only resulted in other errors. Once again, others found success in modifying the directories or cleaning and rebuilding the project, as well as checking for typos in the file names (which I couldn't find, but I might have missed something).
Cleaning and rebuilding can be found from the Build menu:
You can also manually clean by deleting all folders named "build". You can either find these by looking through Windows explorer, or by switching Android Studio to the "Project" view and deleting those files from there:
If you're seeing "Attribute not allowed here" errors, then you're probably editing a file within a build folder. You also shouldn't need to add "module_name" anywhere; this is something that Android Studio itself is supposed to handle.
It's more likely related to the aforementioned libraries/file paths. A couple of things you could try or check:
I can also take a look at it the next time I'm in front of that laptop (or the next time it appears in front of me).
Thank you for your help! Ms. Myers told me you worked on this last night, so thank you for your time as well.
I was wondering if you could summarize what you found out last night (just so I could understand a little better)? She told me that the project just needed to be built, are there any other steps that still need to be taken?
Also, just in case you didn't know, when I try to build right now another error comes up that says:
"Thank you for your help! Ms. Myers told me you worked on this last night, so thank you for your time as well.
I was wondering if you could summarize what you found out last night (just so I could understand a little better)? She told me that the project just needed to be built, are there any other steps that still need to be taken?
Also, just in case you didn't know, when I try to build right now another error comes up that says:
"Error:Failed to complete Gradle execution.
Cause:
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at https://docs.gradle.org/2.10/userguide/gradle_daemon.html
Please read the following process output to find out more:
Error occurred during initialization of VM
Could not reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.""
That error means that gradle was trying to reserve more memory (RAM) than
the laptop would allow. There should be a file called something like
"build.properties" where you can reduce how much memory it's trying to use.
It'll have a line that has things like "-Xms512m". Given how little memory
that laptop seems to be able to use, try lowering that number to around 256.
On Tue, Feb 2, 2016, 1:31 PM Rebecca Nicacio notifications@github.com
wrote: