我正在尝试在wamp phpmyadmin上发送数据。我正在使用volley库发送本地主机上mysql数据库中的数据,但是我的代码中的volley是红色的,给出错误(无法解析符号volley)。我已经在 libs 文件夹中添加了 volley 库,但问题仍然存在。
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.makeaccount);
emailHint = (EditText) findViewById(R.id.emailHint);
userNameHint = (EditText) findViewById(R.id.UserHint);
passHint = (EditText) findViewById(R.id.enterPass);
reenterHint = (EditText) findViewById(R.id.Reenter);
back = (Button) findViewById(R.id.BACK);
ok = (Button) findViewById(R.id.OK);
requestQueue = volley.newRequestQueue(getApplicationContext());
尽管我已经在 libs 文件夹中添加了 volley 库,但最后一行中的关键字(volley)是红色的。还在 gradle 文件中添加了 volley 库,但仍然不起作用..
compile 'com.mcxiaoke.volley:library:1.0.0'
任何人都可以解决这个问题吗?
最佳答案
Repository com.mcxiaoke.volley
基本上是 Google 库的一个分支,所以我想你只能使用官方版本。另请注意,根据mcxiaoke/android-volley READ.ME
:
(...) this project is deprecated and no longer being maintained, please use official version from jCenter.
compile 'com.android.volley:volley:1.0.0'
关于php - 无法解析变量 Volley ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40942000/