Alright, I have spent 3~ hours total trying to fix this issue, and I can't for the life of me figure it out. I'm trying to start programming in Android Studio and I'm following TheNewBostons tutorials. I've followed it exactly, and every time that I switch the theme to "Material.Light" I get a Rendering Issue.
Here's the issue:
Error Message
I've tried several different fixes, like switching the renderer to a lower version of Android, editing styles.xml or something like that, and nothing has fixed it.
I've just started a new project, and haven't done a single thing. Does anyone have any light they can shed on this?
You are using the Support Design Library, and when you use the design library you must use a theme that extends Theme.AppCompat, as the error message says:
You need to use a Theme.AppCompat theme (or decendant) with the design library.
So instead of selecting Material.Light, rather select Appcompat.Light.
Related
I just started my first Android Studio project and I already come with a problem :)
I search on google for the answer but didn't find my problem.
So I need your help please ^^
I download the last version of Android Studio, create a project with an Empty Activity and I came up with this
As you can see my ConstraintLayout is really small and I just can't work with this.
I didn't touch anything on the project. Just to be sure I create 3 projects that have the same issue and redownload 4 time Android Studio.
On the virtual Devices, it looks correct throw: Screenshot
I put the XML code just in case it can help
xmlcode
Hope I was clear and sorry for my English ;)
EDIT: For some reason, the constraint layout fit correctly on the watch screen, but I don't want to create a watch app x) screenshot_watchview
Ok so I have finally find the problem ! I'm so happy right now :D
The problem was the AppTheme theme that I use, I switch it with the DeviceDefault theme. I don't know why this theme was causing problem but now it work and I can finally work on my first Android App !
If you are using the supportLibrary 28+ then this thing happened to me too.
and when I change the support lib version to the 27, it works.
Maybe this is a possible bug in the support library 28+.
Changing the AppTheme works like a charm if you want to stick with the support library 28+ But if you still don't want to so Try using the support library below 28.
I am not sure what's going on I searched everywhere not what to do. I am trying to change the themes of the app, but only certain themes are available coding
available themes1
available themes2
These are the only themes available if I try using other themes it's causing an error
Use #android:theme/... as follow
I know this may sound a trivial question, but I can't figure it out on my own. I've Googled and searched many many times. I know it may have a simple solution but I don't know where to search anymore. In general, I'm a Windows programmer, but I started programming for Android about 4 months ago. I've developed a fairly extensive application. The problem began when I started programming...my spinners are the solid gray rectangular style (unlike the newer style with the triangle in the lower right corner). When I started developing this app several months ago, I couldn't figure out why my spinners were different (after many hours) so I just ignored it. I'm at the point now of polishing my program and want the newer spinner style. So, I'm beating my head against the wall again. I went to my Android SDK Manager in Eclipse and updated my Android SDK Tools, Platform-tools, and Build-tools. I have the latest versions of all of these (22.3 and 19.0.1). When I create a new project, the newer spinner style appears. However, none of my older projects changed. They still have the same old gray, rectangular type spinners. I tried using a "android format" line command I found while Googling, but no luck with that either. I know there is probably something really simple I can do, but I can't find it. Can anyone help me with this? I'm using ADT Bundle with build v22.2.1-833290 on a Mac OSX Mavericks.
Newer spinner style works from API level 11.
So, you have to run in Android 3.0 and higher devices. If u want the same style in below 3.0 versions, then you have to customize your style. Like, take that newer style type of image and apply as a background to the spinner.
Try using ActionBarSherlock in your code. This will give you an advantage to have actionbar in lower versions of android. Also it contains ICSSpinner(An alternative to androids default spinner), which will give the newer look of spinners in lower versions of android.
Here's the link for ActionBarSherlock
http://actionbarsherlock.com/
I spend an unpleasant time looking for erros in my android layout, fields not showing up being the predominant one. As I see other people here also struggling a lot with android layouts I thought to throw this question in even so not completely according to the SO question guidelines.
What tools are out there to help with the creation of android layouts.
there is only one i know. its called http://www.droiddraw.org/
over the time i figured though that the best is still to create your own by code.
If you're using a newer SDK within Eclipse (eg android 4.0 or 4.1) it should help you with the layout (with much more functional drag and drop and alignment/spacing). However, you may still want to manually verify it to make sure it's exactly what you want, since you'll be changing other parameters too.
I am in the process of putting together a little Android app. I have created a couple of widgets by extending the ImageView and ScrollView widgets. The problem that I am having is not with the code itself (i.e. everything runs wonderfully) but rather with the Eclipse "intellisense" in an XML layout. If I am using the native android widgets, I get the normal eclipse suggestions and all is well. However, as soon as I add a reference to my widget (i.e. ) I lose intellisense on my widget AND (more painfully) on all widgets below my widget. In other words, I don't get intellisense on a if it exists below my widget. Again....everything runs, there is no error anywhere, it just becomes insanely slow to program this way.
This is very frustrating as I don't remember all the attributes of the various controls.
Has anyone encountered this or have any suggestions on where to begin trying to solve this? I don't even know what the correct term in Eclipse to start looking at this. After 3 days looking off and on, I am at my wits end.
Thanks in advance for any suggestions!
Try the new ADT 9.0.0 plugin. It has many improvements of the "visual editor". See the changelog here