Missing styles prevent preview of layout. How to resolve? - android-studio

I had a preview build installed which would render my layouts fine but when I tried to load some sample projects there would be some issue about not finding the sdk (even though it was pointing to the right location). It's been a few months since I updated AS and so I installed the latest stable build. I now can load sample projects without any sdk location problems, but now I always get errors when trying to preview a layout.
Specifically, it's saying there are missing styles, in this case '?attr/actionBarPopupTheme (image below). This is a sample project (ListPopupMenu) and so it should be there somewhere, right? How can I resolve this?
I'm using Build #AI-143.2489090

Change your app theme(click the button called “AppCompat”) to any other theme like AppTheme with no actionbar(just try four to five theme)
If that doesn't work,turn down the API version,the green robot button right side of theme button
If that is still not working,restart andoid studio

Related

How to solve template error in Arcgis AR for iOS

I am trying to create an AR App for navigation, so i downloaded the templates suggested by arcgis for that, while there were no errors in xamarin.forms there are lot of namespace errors in xamarin.ios where i wanted to build my app, the errors are attached below[
There was some import bug in Esri Xamarin.iOS templates alone, to rectify that problem, we need to go to Tools->Package Manager-> Manage Nuget Packages for solution->Search for all ArcGIS Packages-> once the search results are out, go to a ESRI.ArcGISRuntime package-> click the checkbox on the right where you will see it unchecked(in project version installed format)-> after checking the box you will find the install button select install-> Do it for all Esri.ArcGISRuntime packages and the errors will disappear.
If there is one error for "using ArcGISRuntime" use "using ESRI.ArcGISRuntime"

Godot Engine crash when Export with custom build template

I was following a tutorial of setting up a custom build for Android in Godot from this link. I am very sure that I have followed all the instructions, but godot engine always crash (white screen) without showing any error message, when i tried to use one-click deploy. The screen stuck at here:
I am using Godot 3.2.2. Anyone please help.
I also got the same problem first. In my case, the problem was with JDK version mismatch. Make sure you are using the jdk-8.0.265.01-hotspot version.
here is my screenshot: Editor Setting > Android

New android studio rendering issue with 'coordinatorLayoutStyle'

I had android studio and it was perfect without any problem. Everything was going right until I reinstall my windows to make PC a little faster. And then I install android studio the latest one. And though the last one was also up to date, there were no problem at all. But, in the new android studio any project I start or any project I open which has constraintLaoyout, the design view of xml get stuck with following errors.
Rendering Problem
Failed to find style 'coordinatorLayoutStyle' in current theme
Second error when I put any widget or anything on my activity
Missing Constraints in ConstraintLayout
This view is not constrained. It only has designtime positions, so it
will jump to (0,0) at runtime unless you add the constraints The
layout editor allows you to place widgets anywhere on the canvas, and
it records the current position with designtime attributes (such as
layout_editor_absoluteX). These attributes are not applied at runtime,
so if you push your layout on a device, the widgets may appear in a
different location than shown in the editor. To fix this, make sure a
widget has both horizontal and vertical constraints by dragging from
the edge connections.
First, update your project to use the latest build version. This helps fix a lot of problems when it comes to most Android views.
Second, go to your style and add this line of code to fix the first error
<item name="coordinatorLayoutStyle">#style/Widget.Design.CoordinatorLayout</item>
Third, the children of CoordinaterLayout must be constrained, if you are new to this layout, you can switch to RelativeLayout or you can use the design view to add constraints. View the official documentation here
A helpful video on constraints HERE
I found the implementations of dependencies in build.graddle(Module: app) were API 28 but there was only API 26 in following directory
C:\Users\[username]\AppData\Local\Android\Sdk\extras\android\m2repository\com\android\support\appcompat-v7
So I deleted all SDK platforms and build tools and installed them with API 26 in SDK manager(select Show Package Details).
Then I started new project. The projects made with API 26 had no rendering problems.
Have you tried adding design library in your build.gradle?
If not then just add it
implementation 'com.android.support:design:23.2.0'
Finally solved the problem. Writing this answer so that other can get help form similar kind of problem.
By default when we create a new project in android studio, it uses the latest API from SDK. In my case it was API 28. But, API 28 was incomplete or partially installed. I tried installing the API 28 completely but it did not work for some reason. Then I deleted that API 28 and installed API 27 latest. And by doing this when I create or open any new project that uses the API 27 and gets all the required things in there. And that is how I solved my problem.
Thanks everyone guys who tried to help me.

Rendering Android Studio

I'm a absolute beginner in programming but I'd love to create my own Apps to make my (and someone else's) everyday life a little easier. I just downloaded the latest version of Android Studio and installed it with all tools.
I wanted to create a "Hello World" App as shown in many tutorials on YouTube. I followed them step by step but there is always this Rendering Problem directly after I finished creating a blank activity.
Rendering Problems
The following classes could not be instantiated:
-android.support.design.widget.FloatingActionButton (Open Class, Show Exception, Clear Cache)
Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE
Exception Details
android.content.res.Resources$NotFoundException: Unable to find resource ID #0x1080029 at ....
I have no clue what the problem could be and how I solve it and all the answers on google and here on stackoverflow.com to a already existing Rendering Problem couldn't help me.
It's a bug in the Android Studio and Android Design Support Library (ver 23.2.0) that is solved in Dev/Canary channel.
For now, if you use the Stable update channel, you have to edit by hand the build.gradle file.
Under Project tool window -> Gradle Scripts open and edit the file build.gradle (Module: app).
Search for dependencies and make sure the com.android.support.design line looks like this:
compile 'com.android.support:design:23.1.1'
Save
Tools -> Android -> Sync Project with Gradle Files
Build -> Rebuild

Static library not working after update of Monotouch/Xamarin

About two years ago I built an image viewer into my Monotouch application. See this question of mine from way back when I was looking for an image viewer for monotouch. I used the source of MTGallery and used btouch to bring this into my Monotouch application. This worked perfectly and has been working perfectly for the last two years. But at some point in the last six months one of the updates that I did to Monodevelop has broken this functionality. Now the viewer is not showing the image, it is just showing a blank screen. The source for this hasn't changed, in fact it I still have the compiled library that was compiled two years ago.
I know that at the end of last year, I could compile my Monotouch application and the image viewer would work correctly. I have a backup of the application source from December 2012. If I deploy the version that was compiled then to my iPad it works correctly. But if I recompile the same source now without making any changes to the source or the settings in Monodevelop, it doesn't work.
So, this is what I have tried: Updated Monodevelop (I had to upgrade my Mac OS to Mountain Lion to be able to do this). Installed Xamarin Studio and got a new license for this development environment. The image viewer does not work when compiled in either Monodevelop or Xamarin Studio. I have tried recompiling the Objective-C library. I tried using btouch again to recreate the C# files for inclusion in my project.
Nothing I have tried so far has helped. Does anyone have any idea what could be causing this issue and what I could try changing to get this working.
UPDATE:
I am now a step further; I have determined that the static library is in fact being called and if I rotate my iPad the image is then showing in the viewer, but is not showing before a rotation takes place. From looking at the Objective-C code it appears that the image was initially being loaded by the scrollViewDidEndDecelerating delegate method of the UIScrollView. It seems that this is now not firing when the image viewer loads, whereas previously it was firing.
If it did work and suddenly doesn't without any change from you, it's probably a bug in Xamarin.iOS/Studio. The best way to get this fixed is to create a bug (http://bugzilla.xamarin.com) and attach your project so we can have a look at it.

Resources