I couldn't make my first app

Multi tool use
I couldn't make my first app
So, beginner here and I have a problem with dropping the plain text widget into the layout. Here is a screenshot.
I cannot constrain the widget because the widget does not even show. I looked at various tutorials on how to bypass that but I have been unsuccessful. You may see that there is a render problem, missing accessibility label and failed to instantiate one or more classes3. So, my question is, why is widget not showing and does it have to with the 3 messages that android studio threw at me?
Edit 1:
Mandatory: Based on the second answer I changed this code: "Theme.AppCompat.Light.DarkActionBar" into this one: "base.Theme.AppCompat.Light.DarkActionBar". With the second solution, I was able to drop my widgets into the layout screen. This is why I say that the answer half-helped me because I got forward with my project but lost my 'design' feature(the one alongside the 'blueprint'). Here are some photos that may help you understand my problem:
strings.xml
AndroidManifest.xml
MainActivity.java
As you can see, I don't have the design feature:
Render Problem:
Missing Constraints:
Missing Styles
Missing Styles
Hey Brad, I am sorry for my negligence. I am still trying to learn how to ask questions over here. You can be rest assured that I will read the help page going forward.
– Shreeman Gautam
Jul 3 at 14:31
2 Answers
2
Try to use same version in gradle compileSdkVersion
, buildToolsVersion
, and supportLibraryFunction
compileSdkVersion
buildToolsVersion
supportLibraryFunction
Also check in project file of gradle has
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
}
Hope this helps for you.
Can you guide me through all of this? Like, which files do I open to get to, let's say compileSdkVersion? I am a beginner in this and Java, for that matter.
– Shreeman Gautam
Jul 2 at 17:41
Grateful for your time!
– Shreeman Gautam
Jul 2 at 17:48
open build.gradle(Module: app) check
compileSdkVersion
, targetSdkVersion
and dependencies
library has same version. Ex: compileSdkVersion 27
targetSdkVersion 27
implementation 'com.android.support:appcompat-v7:27.1.1'
in dependencies also has version number of 27– vijikrish
Jul 3 at 4:20
compileSdkVersion
targetSdkVersion
dependencies
compileSdkVersion 27
targetSdkVersion 27
implementation 'com.android.support:appcompat-v7:27.1.1'
Hey vijikrish, I checked and yes, all of the three things have the same version. I appreciate your guidance!
– Shreeman Gautam
Jul 3 at 15:14
Hey eyllanesc, thank you for your answer!
– Shreeman Gautam
Jul 3 at 15:15
First of all, welcome to the Android Community.
Now, regarding your error, here are few possible solutions which might work:-
If the above solution does not work
I hope this helps.
EDIT:
Change the styles.xml as follows:-
<!-- Base application theme. -->
<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">@color/primary_color</item>
<item name="colorPrimaryDark">@color/primary_dark_color</item>
</style>
There was a typo, b in Base should be capital
I hope this edit helps.
Regarding your first solution, it didn't help me at all because the same messages flared again. The second solution helped me go forward but took something away from me. I cannot fully illustrate in words, the slew of new problems. I also don't know how to attach pictures in the comments. I'll make a new post regarding the new problems. Can you check that out? I would be grateful.
– Shreeman Gautam
Jul 2 at 17:47
@Shreeman Gautam, you can edit this question by including new errors, I will check that out and see if I can help with it, May I know if the gradle build is successful or not? If not please include the screenshots of the error message.
– Sankalp
Jul 2 at 19:30
Also, please include the code of xml and java, it would be a great help. Regards, Sankalp
– Sankalp
Jul 2 at 19:38
I have edited my questions as you have suggested. How can I know if a gradle build is successful (although I have included the screenshots of the error message)? Lastly, thank you for your help. I appreciate it!
– Shreeman Gautam
Jul 3 at 3:30
Hey Sankalp, I appreciate your time and effort to help me. Turns out, it was a typo and now I have my design back. I have one question though, why did your solution work? implemented it but I have no idea how it works. Thanks!
– Shreeman Gautam
Jul 3 at 15:17
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
"I don't think the community should downvote a new user" I think new users can spend the 2 minutes it takes to read the help page, not to mention all the prompts explaining how to ask a question that can be answered. Based on your question, it seems you disagree. You can go elsewhere or hire a consultant. Or, try again to write a clear, concise, and specific question that we can answer, and one that may help others in the future. This isn't a consulting service, it's a place where you learn and then go to teach others. And yet, you couldn't be bothered to put your code in your question.
– Brad
Jul 3 at 4:53