Android Studio - Navigation Editor not showing previews after using amplify sdk - android-studio

Suddenly the preview of the navigation graph just dissapear. After a deep research I figure out this problem was triggered right after adding the amplify dependency.
To reproduce this bug, follow the following steps:
Clone the repository https://github.com/rchampa/NavigationXMLBug
Go to :sharedlibrary build.gradle file and change from:
implementation('com.amplifyframework:aws-auth-cognito:1.33.0')
to
api('com.amplifyframework:aws-auth-cognito:1.33.0')
Open the the nav_grap.xml file located in app/anyfeature/res/navigation
If you don't see the result as is described in the picture bellow then restart android studio.
The bug is about I cannot see the preview of the nav_graph.xml however I still can use the code section but is anoying see nothing in the preview.

Related

Kotlin Multipplatform - can't see Greeting.kt in Android Studio folder tree

I am just starting to learn KMM (I'm an Android java guy right now) and going through the default Greeting version of Hello World that is automatically put into a new application. My environment seems to be working as I was able to run the default app on both Android and iOS emulators.
However I can't see the file Greeting.kt in the Project tree. I can certainly search for it and open it from Find, but when I drill down the tree shared/commonMain/kotlin/com.myapp... it only shows Platform.
I have a screen cap that shows the path of the open Greeting.kt at the top, but not visible in the tree:
(screen cap)
Unfortunately I can't post an image (not enough reputation), but when I open the file Greeting.kt by doing a Find In Project, it shows the path at the top of the screen (My Application > shared > src > commonMain > kotlin > com > example > myapplication > Greeting), but when I manually drill down the Project tree on the left side of Android Studio Greeting.kt does not show up.
I can also find the file in the Mac Finder. My guess a preference in Android Studio is incorrect?
Any ideas on what might be wrong?
Thanks in advance
Turns out it was an official bug. Solution is to upgrade to Beta version of Android Studio (Chipmunk)
I submitted a bug report to Google and they looked into it:
The root cause is that before [Android Studio]Chipmunk the source set
setup was incorrect, so even though it says commonMain in your
screenshot (from #2), if you open the Platform.kt under that source
set, you'll see that it is in fact
shared/src/androidMain/kotlin/com/example/myapplication/Platform.kt.
[Android Studio] Chipmunk fixes this issue.

Visual Studio Code - Azure Functions - New Project button disappeared

So I have been messing around trying to create an Azure Function using Visual Studio code. Frustrated enough to start all over and now according to Microsoft, to create a new project, I have to click the Azure icon on the left hand side and click New Project:
That being said, I don't have it anymore somehow:
Somebody please advise. I'm going crazy here trying to make it reappear.
For me, this option was buried in the sidebar menu in vscode as pictured below. I was not able to get the icons to reappear (I'm on an Apple Silicon machine).
1.Try to uninstall Azure Function Extension.
2.Restart Visual Studio Code.
3.Install the extension again.
The documentation on how to create New Azure Function Project in Visual Studio Code appears to be out of date. I found the solution in the store page of the extension. Open the 'Azure' extension, go to Workspace, click the plus, create function. Proceed as normal as per the MS Docs. Uninstalling did not work for me as #bala suggested.
Yeah, I did not had the button to create a new local Azure function.
I uninstalled Azure function plugin and after the refresh the button appeared. When I clicked the button, it informed me that I need to have Functions plugin installed.Then I reinstalled the plug-in and the button disappeared.
Restarting and Updating VSC fixed the issue.

How do you share code from Android Studio into GitHub without it losing it's gradle and functionality when teammate clones it?

Properly working project not from GitHub. My team and I are trying to use version control for Android Studio via GitHub. The code is operating fine on my computer and then I upload it to GitHub creating a repository. The problem comes in (I think) when my teammates clone the code to their Android Studio environment. When they open the code on their Android Studio they can't use "preview" for seeing the layout of the app. There also is no APP file structure for them as there is for me when I view the APP I originally created. There is also an error message saying "This project 'some project' is not Gradle based" we're completely befuddled as it seems as if it should be a simple transfer of files. Any idea on what we're doing wrong.
Broken and cloned project from GitHub

Views in Layout Not Getting Created Properly

Recently, I came across an issue with my layout files. Whenever I click enter to add a view in an .xml file like so:
And then when I click enter:
As you can see it did not generate the attributes like 'layout_width' and 'layout_height' etc.
This problem only happened after connecting my Git account to Android Studio.
This issue is only in the 'Text' tab of the layout file, so the 'design' tab works fine
I have 'Invalidated Caches & Restarted' but that didn't work.
EDIT: I opened up another project and added a view throughout the text tab and it worked - the working project is not connected to Git.
Thanks.
Try this steps below
1 Sync your project (If it's doesn't work) try this below
2 Invalidated Caches & Restarted
3 Restart Your System or Android Studio
What's your android version?. maybe that's a bug in that android studio version please try updating studio.
The problem was in my gradle.build (Module:app). My target SDK version was set to 26 which it gave a warning about compatibility issues. So after changing it to 28 and syncing my project the issue was solved.

Android Studio Clicking on "Project Structure " not working

I have met a strange question about Android Studio and I have tried to find a solution on the Internet but it failed.
Here is my question:
I open the Android Studio and the project can be installed to my device correctly. However, when I tried to open the Project Structure, it failed without any response. I just clicked on the button below but the Project Structure dialog didn't show up:
I have SDK installed below:
Please help me how to open the Project Structure dialog.
I have found a method to avoid my problem. My way is that uninstalling my sdk which version is Android 4.4. After doing that my project structure shows up. try deleting your current sdk for an attempt.

Resources