• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Problems with creating Basic Activity in Android Studio

RavenEXP

Lurker
So I installed Android Studio 3.1.3
Then I created a new Basic Activity
And when the project was build I faced these 4 errors:
https://imgur.com/a/ptL8ARY

Please someome explain how to fix them.

Edit: I changed the SDK from 28 to 27 and everything works fine now.
Here is how to do it:

In build.gradle(Module app) change
compileSdkVersion 28
targetSdkVersion 28
To
compileSdkVersion 27
targetSdkVersion 27

And chnge the dependencies version to:
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'

Special thanks to StackOverflow user: Geraldo Neto
 
Last edited:
The only severe problem on that list is the first one, the render problem. That one usually goes away when you build the project again after fixing the other errors.

I have not had any of the other three errors before so I can only guess from the text in the messages (which was very small and got quite blurry when I zoomed in to read it).
  1. It looks like you've used some "private resources" that it doesn't want you using; perhaps it would be best to follow its advice and make copies of those resources. I'm really not clear on what a "private resource" is but if you search somewhere like StackOverflow for "android private resources", you'll find out more.
  2. The complaint about the styles is probably a typo (of sorts). I'm guessing you typed in some code from a tutorial and that tutorial is using styles which aren't accessible to your project. Try selecting a different style from the ones that ARE available in your project. (There always seem to be several styles built right into Android Studio).
  3. With regards to the class instantiations, I tried instantiating both of the problem classes on *my* copy of Android Studio, which is also 3.1.3, and I had no problem with it. I'm not sure what you need to do to fix this. The advice in the error message is probably the best thing to do but I really don't understand it. I'm almost as new to Android Studio as you are :-). Perhaps someone else here can suggest something?
I probably haven't solved all of your problems but maybe I've got you going in the right direction....
 
Your screenshot on imgur is too fuzzy to view on my phone. Why not to directly post it here?
Capture.PNG
Capture2.PNG

Can you read it now?
 
Thanks for the suggestions. But it was the SDK making issues. I was using 28 but apperantly it was problematic so I change it to 27.
 
Thank you for posting the resolution to your problem. It may help someone someday when they search for previous posts on a similar problem.
 
Not to be too nitpicky, but this isn't a resolution to the problem, it's a workaround. It should be technically possible to create an app successfully using API 28. We haven't really got to the bottom of why the OP was encountering the issues.
Having said that, API 28 is still in beta, so it could be that they're still ironing out a few problems. But I do find it surprising that it's causing such problems.
 
Not to be too nitpicky, but this isn't a resolution to the problem, it's a workaround. It should be technically possible to create an app successfully using API 28. We haven't really got to the bottom of why the OP was encountering the issues.
Having said that, API 28 is still in beta, so it could be that they're still ironing out a few problems. But I do find it surprising that it's causing such problems.

And for me is surprising, but I saw that 28 is in beta. Maybe when 29 and 30 come out, 28 will be just fine.
 
Back
Top Bottom