I just finished my app, and when I try to save it as an APK, this error appears, all the 'R's in the code turned red. This is not the first time it happens. How do I fix it?
This are all the line with errors in the code, all the R. are in red.:
setContentView(R.layout.dise); final EditText e=(EditText)findViewById(R.id.escribiraqui); TextView T=(TextView)findViewById(R.id.traduccion); Button TRAD=(Button) findViewById(R.id.traducir); getMenuInflater().inflate(R.menu.java, menu); if (id == R.id.action_settings) {
I tried importing android.R, and now the R isn't red anymore, now the error is after the R.id... or R.layout... or R.menu... All my variables are in red now, with the same error:
"cannot resolve symbol 'dise'", etc.
3.I just did alt+Enter
on the R, then clicked on Create a class 'R'...
The error disappeared, is this correct or it could lead to another error?