• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

Android Studio Build Immediate Fail - Is there an Android version issue that makes older code unabl

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This example code was taken straight from github.  I am confident that this code is supposed to build but I suspect something in the compiler of Android Studio has changed, updated, or with a newer version of the Android operating system something needs to be updated in the source code of an app.  This is because a build and/or gradle sync has this error immediately.  Nothing major has changed in the code.  I suspect this might be a common thing and I suspect someone must know something about this and how to fix it.  Please advise.
 
Saloon Keeper
Posts: 27489
195
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Here we have a prime example of WHY POSTING SCREENSHOTS IS A BAD THING!!!

Your lower-right pane says that your project wants an obsolete version of gradle. But the real details (stack trace) don't show, because instead of copying and pasting the text, you posted a screenshot, and the screen cuts off most of the error text.

If you could provide us with the full error text, we could be of more help, although I think you need to look into the gradle upgrade anyway.
 
Xarzu Thompson
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:Here we have a prime example of WHY POSTING SCREENSHOTS IS A BAD THING!!!

Your lower-right pane says that your project wants an obsolete version of gradle. But the real details (stack trace) don't show, because instead of copying and pasting the text, you posted a screenshot, and the screen cuts off most of the error text.

If you could provide us with the full error text, we could be of more help, although I think you need to look into the gradle upgrade anyway.



Well, I tried changing the gradle version number by hand, meaning that I just edited the file, and I got the same error.  So I need to actually perform an upgrade.  Now, I think I need to upgrade two things...?

I carefully looked into all this and I found that it must have something to do with Gradle version.  Do you have any views or knowledge on how to updatge the grande and gradle plugin version?  

http://www.millionthompson/images/work/Gradles.png
 
Saloon Keeper
Posts: 7549
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The link to the image you posted is broken, so it's hard to say what is going on. What is clear from the error message fragment is that a higher Gradle version (7.3.3) is needed. So start with that: search the Android Studio preferences for "gradle", and you'll find the spot where you can set the Gradle version to be used for a particular project.
 
Tim Holloway
Saloon Keeper
Posts: 27489
195
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There are 2 possible interpretations here. One is that that the project requires a higher version of Gradle than Android Studio currently employs. The other would be that the installed Gradle thinks the project's gradle level needs to be upgraded.

We cannot tell which from the screenshots. They hide more than they display. However, my own experience tells me that probably somewhere in your display is a link or button you can click on to attempt to upgrade the gradle environment automatically. It's out of sight on the screenshot, though.
 
Ranch Hand
Posts: 605
11
Android Python Open BSD VI Editor Slackware
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Xarzu Thompson wrote:This example code was taken straight from github.  I am confident that this code is supposed to build but I suspect something in the compiler of Android Studio has changed, updated, or with a newer version of the Android operating system something needs to be updated in the source code of an app.  This is because a build and/or gradle sync has this error immediately.  Nothing major has changed in the code.  I suspect this might be a common thing and I suspect someone must know something about this and how to fix it.  Please advise.



My best advise is to study thoroughly how gradle works. Gradle is a dependency management tool  based on a succession of `tasks`
to solve your issue i suggest you before to read this link

I am telling you that for 2 reasons really important if you want to have a career in Android
1) recently changed the way to use gradle in Android
2) when you will update to gradle 7.3 is really likely that you will find other issues, so is necessary to have a grasp of how gradle works, and how to debug issues
3) Gradle needs to receive instructions in Groovy/Kotlin so is really important to invest time and follow tutorials, it will be a great investment

Please be aware that your Android studio version the gradle plugin and the gradle version need to follow a specific order, the link i sent you explains a lot,
I really suggest you to not get frustrated if you lose some hours and cannot run the project, is something we android dev need to face on daily basis, and when we work gradle problems are never counted in the sprints in an agile framework, because cannot be foreseen, so learning it is worthy. Android Studio gives you a lot of help, read with attention what the stacktrace says because they try to simplify a lot what is happening under the hood.
 
Tim Holloway
Saloon Keeper
Posts: 27489
195
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Urgh. The one thing worse that posting screenshots is quoting screenshots!
 
Giovanni Montano
Ranch Hand
Posts: 605
11
Android Python Open BSD VI Editor Slackware
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Holloway wrote:Urgh. The one thing worse that posting screenshots is quoting screenshots!


oh sorry Tim ahah. Did not do on purpose!
 
A wop bop a lu bop a womp bam boom! Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic