Im trying to fix this but idk why this v31 file keeps generating colors codes (see in SS) when I run my code, I keep deleting the color resources so that my code will run. just want to know how to stop it from doing that
Here is a screenshot of the error and the file
2
Please follow this;
File –> Project Structure –> app(inside Modules) –> Dependencies — Click "+" –> Library dependency –> Search "appcompat" and click "com.android.support:appcompat-v7(com.android.support:appcompat-v7:27.1.1)" –> click OK.
This should solve your error!
Those color resources were added in Android 12 (API 31) so you’ll want to compile with SDK v31 or newer
android { compileSdkVersion 31
Click here to cancel reply.
2
Answers
Please follow this;
File –> Project Structure –> app(inside Modules) –> Dependencies — Click "+" –> Library dependency –> Search "appcompat" and click "com.android.support:appcompat-v7(com.android.support:appcompat-v7:27.1.1)" –> click OK.
This should solve your error!
Those color resources were added in Android 12 (API 31) so you’ll want to compile with SDK v31 or newer