android studio 3.3 clang-tidy - android

Yesterday, Google updated Android Studio to version 3.3 and there it was possible to use a static analyzer for libraries supporting C ++. So, how exactly to use it? I include in:
Preferences->Editor->Inspections->General->Clang-tidy
(Use IDE setting )
but nothing else. If you try through the terminal for the android studio - Then you need to write all the dependencies manually, which is not correct, apparently. And my question is - how in uses cland-tidy for Android studio version 3.3?
I would be grateful for any help and support.

From Android Studio main menu: Analyze -> Run Inspection By Name...
select 'Clang-Tidy', "Run 'Clang-Tidy'" dialog box will appear. Set up needed options and click 'OK'. In the end of the inspection results will be displayed in "Inspection Results" bottom tab.

Related

Xamarin.Forms: deployment issue after Visual Studio upgrade

After upgrading Visual Studio Professional 2019 to version 16.9.2, when I try to deploy on Android Emulator
api 28 (9.0), I get following error:
Error XA0130: Sorry. Fast deployment is only supported on devices running Android 5.0 (API level 21) or higher. Please disable fast deployment in the Visual Studio project property pages or edit the project file in a text editor and set the 'EmbedAssembliesIntoApk' MSBuild property to 'true'.
Before the upgrade, everything worked fine. This is really frustating!
To correct this problem I had to
uninstall app on Android phone (important step)
Unload Android Project from solution explorer
This brings up the project file code now search code for
<EmbedAssembliesIntoApk>false</EmbedAssembliesIntoApk>
Change false to true save
reload project problem solved.
Note leave fast deploy checked.
Go to >> Solution Properties>> Android Options>> Uncheck "Use Fast Deployment(debug mode only)"
I had the same issue recently after adding images to my project found out that I had upper case letters as a name SomePicture.png renaming all images to lower case solved it.
#AlwinBrabu, I think you meant "Project Properties" -> Android Options -> Uncheck Fast Deployment(debug mode only).
This worked for me, although this is a workaround. I do not consider it a solution.
To solve this, I had to right-click on the Android project in the Solution Explorer, then in Options -> Android Build uncheck the Fast Assembly Deployment option.
Then deploy the project on the Android emulator.
But after deploying it once, I went back to the settings and checked (i.e. ticked) the Fast Assembly Deployment option, and subsequent deploys worked fine.
I'm running Visual Studio for Mac 2022 version 17.0.1 (build 72).

Where did the "Profile or Debug APK..." option disappear to in Android Studio 3.4.1?

Android Studio used to have the option to debug existing APKs from the File->Profile or Debug APK. I have used it in Android Studio version 3.4. Now at version 3.4.1, I cannot find it.
Does anyone know if the option was removed from Android Studio or where can I find it?
I had this same issue and here's how I solved it.
I had disabled APK and NDK support in hopes that it would speed up my IDE. I forgot to turn them back on. So I went into Preferences > Plugins and if you don't have them installed, install Android NDK and Android APK support. If you already have them installed, tick Android APK Support and it will prompt you to enable Android NDK Support if you don't have it enabled already.
Since Android Studio menu can be customize, by some way the option has been removed from your toolbar. To add it again go in File -> Settings -> Appearance & Behavior -> Menus and Toolbar
From here open the Main menu -> File -> File Open Actions folders.
Select the Open line, then click on the plus sign on top of the window next to the search bar. Click Add Action... and search for Profile or Debug APK... options.
Apply and you're good to go !
Edit
After some exchanges in the comments we fixed the issue another way.
You have to go into Settings -> Plugins first. Check if you have the plugin Android APK Support activated/installed. If not then install/activate it.
And now you're really good to go !
That's weird because I am using android studio 3.4.1 and its there:
When I had problems after updating android studio all I did was to re-install it and my problems got fixed.
Also, you should know that downloading another version of Android studio is really user-friendly, check my question about it.

Android side of a Flutter project showing error

I have a Flutter project where, all of a sudden, without me doing anything special as far as I can remember..the Android side has started to show an error, and I am totally lost, I have no idea at all of what is wrong or why that happened.
That is what I see when I open the android folder, the MainActivity on the flutter project on android studio:
I have tried calling flutter clean, restart/invalidate cache, gradle clean...and so far nothing works.
The weird thing is that the project actually runs in the emulator without any problem. And also, if I open the Android part independently on Android Studio i don't see any error.
Anyone had that before?
Android Studio version 3.3.1
Solutions of this answer do not work.
** ----- NOTE ----- **
The problem here can be (not sure at all maybe someone else can help here) that I am using a flutter package called ImagePicker, which after some code investigation, it turns out that it is using some AndrodX imports....and...as far as I am aware of...Flutter is not yet compatible with AndroidX.
But i need someone else to confirm that in order to post a solution.
This error is not really an error. This happens because android studio is set to read and edit dart not java. In order to edit the android side of a flutter project, you need to click on the android folder -> go to the flutter option -> click 'open in Android Studio'.
This will then allow you to edit the android side of your project.
Set Configure to the Android project SDK of flutter application
Step by Step
Click on File -> Project settings then select appropriate API level as per your project will solve your issue

Xamarin Blank Screen

I am trying to explore Xamarin, trying to create simple CURD project.
I was able to make some progress by watching youtube video's, but I am not sure what went wrong all of the sudden I am getting blank screen in my emulator when I am trying to deploy the project.
Firstly it showed me error stating
'the targetFrameWorkVersion is greater than my project version. You
need to increase the version for the project'.
I tried it, I increased my project version. This issue got resolved but gave birth new error.
Secondly
'To deploy this application, your deployment target should be running
Windows Universal Runtime version 10.0.16299.0 or higher. You
currently are running version 10.0.14393.2007. Please update your OS,
or change your deployment target to a device with the appropriate
version.'
I looked up for newer version of OS, but it seems my OS is already up to date.
I really appreciate if anyone help me out with tips or clue.
Environment is as follows
Visual Studio: 2017
Operating System: Windows 10
I am attaching ScreenShot of error
:
Try this
Set your android project as StartUp project
In your VS menu go to Build ->Configuration Manager
Uncheck the UWP project from both Build and Deploy, i hope your issue will be sorted.
first
its not your SDK, this is cause by old nugets in your project.
update all your nugets. at least xamarin.forms.dll
second
update your windows OS to latest. then
install appropriate microsft windows mobile sdk version. the link should appear when you right click your project and select install missing features
https://learn.microsoft.com/en-us/windows/uwp/updates-and-versions/choose-a-uwp-version

How change build target (2.2 to 2.3.3)? Or recover after trying

I need to change my projects's build target from 2.2 to 2.3.3 in order to use Google API with map support. I changed the manifest's min- and target SdkVersion to 10. And the project's properties|android to 2.3.3. And under my project folder in Eclipse there is then the Android 2.3.3 directory to indicate that the stuff worked out that far.
But when I try to run my application I get the non-informative Eclipse "Problem Occurred" dialog: An internal error occurred during: "Launching MyProjectName". java.lang.NullPointerException
Now even if I change back to 2.2, I cannot make my old classes run. Again, Eclipse-hell has broken out. Its huge mess fails to find its own files. What can be done to help this? Other that starting all over again.
If you want to change your build target for an application, you need to follow these steps
Project -> Right Click and Select properties
Select Android option on left side pane
In the Project Build Target on right side pane, select the target you wish
That is it. Thanks
If I were you, I'd do Project > Clean in Eclipse to see if it helps.

Categories

Resources