Android工作室毕加索表示无法解决'加载'[关闭]

问题描述 投票:-4回答:2

所以我是android编程的新手。我正在努力学习它,以便我可以在我的大学项目上工作,这是在线食品订购应用程序。所以作为一个新手,我正在参考这个视频教程 - https://www.youtube.com/watch?v=Ad41Bh704ms&list=PLaoF-xhnnrRW4lXuIhNLhgVuYkIlF852V

上传者正在使用android studio版本2.3.3,而我正在使用android studio 3.3.1。所以我知道这里和那里几乎没有变化。现在,我从那个版本的毕加索那里得到了一个这样的改变......

我使用了确切的代码组作为他,但对我来说,它在“加载”enter image description here时出错

这就是它所说的 - enter image description here

我已将此版本的毕加索作为依赖添加到我的build.gradle中... enter image description here任何人都可以帮助我吗?什么可能在“加载”中触发错误,我该如何解决?提前致谢

android picasso
2个回答
5
投票

这只是一个错字。而不是写作

Picasso.with(getBaseContext().load(food.getImage())).into(food_image);

使用

Picasso.with(getBaseContext()).load(food.getImage()).into(food_image);

0
投票

你在那边打错了。必须关闭已启动的方法。你打字的内容:

Picasso.with(getBaseContext().load(food.getImage())).into(food_image);

应该是什么:

Picasso.with(getBaseContext()).load(food.getImage()).into(food_image);
                             ^

检查您是否启动了with()方法并且没有关闭它。

© www.soinside.com 2019 - 2024. All rights reserved.