Android Studio Kotlin Compiler warning - android-studio

I found warning in Kotlin Compiler settings
Following modules override project settings: app
Project compiles and works perfect but can this warning make affect in future? And how to solve this.
Thanks in advance.

Open ProjectFolder/app/app.iml and edit the following node, changing useProjectSettings to true.
<facet type="kotlin-language" name="Kotlin">
<configuration version="3" platform="JVM 1.6" useProjectSettings="true">
<compilerSettings />
<compilerArguments>
<option name="destination" value="$MODULE_DIR$/build/tmp/kotlin-classes/debug" />
<option name="noStdlib" value="true" />
<option name="noReflect" value="true" />
<option name="moduleName" value="app_debug" />
<option name="addCompilerBuiltIns" value="true" />
<option name="loadBuiltInsFromDependencies" value="true" />
<option name="languageVersion" value="1.2" />
<option name="apiVersion" value="1.2" />
...
</compilerArguments>
</configuration>
</facet>

Related

AS IDE font unreable

I changed my windows system font to Google Sans which I like very much but now android studio ide font is not being displayed properly. How do I fix it, I do want to keep my system font though.
After some digging I found a file in
C:\Users\USERNAME\.AndroidStudio4.0\config\options
called ui.Inf.xml
which was
<application>
<component name="UISettings">
<option name="SHOW_MAIN_TOOLBAR" value="true" />
<option name="SHOW_MEMORY_INDICATOR" value="true" />
<option name="SHOW_NAVIGATION_BAR" value="false" />
<option name="SHOW_STATUS_BAR" value="false" />
</component>
</application>
I added these 3 lines
<option name="FONT_FACE" value="Consolas" />
<option name="FONT_SIZE" value="24" />
<option name="OVERRIDE_NONIDEA_LAF_FONTS" value="true" />
saved the file and restarted as.
Done!!!!!!!!!!!!!!!!!!!!

Specific cordova hooks in config.xml per platform

I was trying to use to run specific nodejs scripts per pratform.
In the docs it says it is possible set a hook per platform:
https://cordova.apache.org/docs/en/edge/guide_appdev_hooks_index.md.html
If i put the hooks in config.xml outsite of the platforms tags, the scripts will be called:
<hook type="before_platform_add" src="HookInstallPluginsWP8.js" />
<hook type="before_platform_add" src="HookInstallPluginsIOS.js" />
But if I put it inside a tag it does not run:
<platform name="wp8">
<preference name="fullscreen" value="true"/>
<hook type="before_platform_add" src="HookInstallPluginsWP8.js" />
</platform>
<platform name="ios">
<preference name="fullscreen" value="true"/>
<hook type="before_platform_add" src="HookInstallPluginsIOS.js" />
</platform>
What I'm doing wrong?
This doesn't seem to be supported until Cordova 5.x. Are you sure you are running the latest Cordova?
npm install -g cordova
I think I found the reason why this was happening.
Today I tried to add <icons> and <splash> images to my project and I faced the same situation. The icons and splash were not added if inside a platform tag.
In my case this was happening because inside a <platform> tag, it only could exist one type of tag.
For example:
<platform name="android">
<preference name="fullscreen" value="true"/>
<hook type="before_platform_add" src="HookInstallPluginsAndroid.js" />
<icon src="res/icons/android/icon-36-ldpi.png density="ldpi" />
</platform>
In this case the hook and the icon will be ignored.
I have to add different <platform> nodes:
<platform name="android">
<preference name="fullscreen" value="true"/>
</platform>
<platform name="android">
<icon src="res/icons/android/icon-36-ldpi.png density="ldpi" />
</platform>
<platform name="android">
<hook type="before_platform_add" src="HookInstallPluginsAndroid.js" />
</platform>
Is this a documented case? I did not found anything on cordova docs... maybe it's just a bogus situation?

Conditional Include on Items in an Item Group

I want to copy files over to a server but before i do this i would like to include the latest msi file that i generate.
I noticed that the ItemGroup and Item have a Condition attribute but i do not know how to utilize this to include the latest file.
So far this is my setup:
<Target Name="AfterBuild">
<ItemGroup>
<Installers Include="\\SERVERNAME\BuildOutput\ProductStream\**\Installers\Customer\Installer.msi"/>
</ItemGroup>
<Message Text="FirstItem: %(Installers.Filename)" />
<Message Text="FirstItem: %(Installers.FullPath)" />
The output of this are two files:
e.g
\\Servername\BuildOutput\ProductStream\Installers\ProductStreamV2.1.1202.1402\Installer.msi
\\Servername\BuildOutput\ProductStream\Installers\ProductStreamV2.1.1405.1301\Installer.msi
I want to include the 2.1.1405.1301 build in the Item as this is the latest one.
I would appreciate if someone would assist me because i cannot find how to go about doing this from the MSDN blogs.
Thanks,
You could use a custom task for this purpose. It allows you to filter items any way you want. Here I used regular expressions to select the latest installer:
<Target Name="AfterBuild">
<ItemGroup>
<Installers Include="**\Installer.msi"/>
</ItemGroup>
<SelectLatestInstaller Installers="#(Installers)">
<Output TaskParameter="LatestInstaller" ItemName="LatestInstaller" />
</SelectLatestInstaller>
<Message Text="%(LatestInstaller.FullPath)" />
</Target>
<UsingTask TaskName="SelectLatestInstaller"
TaskFactory="CodeTaskFactory"
AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<Installers ParameterType="System.String[]" Required="true" />
<LatestInstaller ParameterType="System.String" Output="true" />
</ParameterGroup>
<Task>
<Reference Include="System.Linq" />
<Using Namespace="System" />
<Using Namespace="System.Linq" />
<Using Namespace="System.Text.RegularExpressions" />
<Code Type="Fragment" Language="cs">
<![CDATA[
LatestInstaller = Installers
.OrderByDescending(f => Regex.Match(f, #"\\ProductStreamV(?<version>(\d+.){0,3}\d+)\\").Groups["version"].Value)
.FirstOrDefault();
]]>
</Code>
</Task>
</UsingTask>

Configuration Errors upgrading from Azure 1.6 to 1.7

I am trying to migrate to Visual Studio 2012 and Azure 1.7 from 2010 and 1.6. When I upgraded my worker project, I am now getting a bunch of errors like:
CloudServices58 : Cannot load imported module named 'Antimalware.'
Which brings me to this in Microsoft.WindowsAzure.targets:
<Target Name="PreValidateServiceModel">
<ValidateServiceFiles
AllowLegacyWebRoles="$(AllowLegacyWebRoles)"
ServiceDefinitionFile="#(SourceServiceDefinition)"
ServiceConfigurationFile="#(SourceServiceConfiguration)">
</ValidateServiceFiles>
</Target>
And errors like this in my cscfg file:
The setting
'Microsoft.WindowsAzure.Plugins.Antimalware.ServiceLocation' for role
MyProject.ProcessLogs is specified in the service configuration file,
but it is not declared in the service definition file.
The error brings me to here:
<ConfigurationSettings>
<...stuff.../>
<Setting name="Microsoft.WindowsAzure.Plugins.Antimalware.ServiceLocation" value="" />
<Setting name="Microsoft.WindowsAzure.Plugins.Antimalware.EnableAntimalware" value="" />
<Setting name="Microsoft.WindowsAzure.Plugins.Antimalware.EnableRealtimeProtection" value="" />
<Setting name="Microsoft.WindowsAzure.Plugins.Antimalware.EnableWeeklyScheduledScans" value="" />
<Setting name="Microsoft.WindowsAzure.Plugins.Antimalware.DayForWeeklyScheduledScans" value="" />
<Setting name="Microsoft.WindowsAzure.Plugins.Antimalware.TimeForWeeklyScheduledScans" value="" />
<Setting name="Microsoft.WindowsAzure.Plugins.Antimalware.ExcludedExtensions" value="" />
<Setting name="Microsoft.WindowsAzure.Plugins.Antimalware.ExcludedPaths" value="" />
<Setting name="Microsoft.WindowsAzure.Plugins.Antimalware.ExcludedProcesses" value="" />
</ConfigurationSettings>
I am pretty lost, any ideas?
I just needed to download and install this: http://www.microsoft.com/en-us/download/details.aspx?id=29209

codeblocks/mingw & windres problems building a .dll (VST Plugin) with png resources

I have a VST plugin that compiles fine with VS200X / MSVC. I am trying to make a Codeblocks/MinGW project also for users who prefer that environment.
When I build the dll with codeblocks it works in a VST host, with GUI, until I start trying to include resources (.png files)
I include the .rc file in the codeblocks project. The resource paths in my resource.h don't have spaces.
If i try and copy the built .dll file the OS has it locked. It is almost as if windres is not compiling the resources successfully and retains a handle on the file - although by the size of the .dll it looks like the resources are there. If I try and run the dll in a vst host via GDB it doesn't hit any breakpoints... presumably the host can't load the .dll.
here are the codeblocks cbp compiler settings...
<Target title="Release Win32">
<Option output="build-win-cb\IPlugEffect" prefix_auto="1" extension_auto="1" />
<Option working_dir="build-win-cb\" />
<Option object_output="build-win-cb\Release" />
<Option type="3" />
<Option compiler="gcc" />
<Option parameters="IPlugEffect.dll" />
<Option host_application="C:\Program Files\vsthost\vsthost.exe" />
<Compiler>
<Add option="-O3" />
<Add option="-msse2" />
<Add option="-ffast-math" />
<Add option="-DVST_API" />
<Add option="-DWIN32" />
<Add option="-D_WIN32_WINNT=0x0501" />
<Add option="-DWINVER=0x0501" />
<Add option="-D_CRT_SECURE_NO_DEPRECATE" />
<Add option="-DPNG_NO_ASSEMBLER_CODE" />
<Add option="-DPNG_LIBPNG_SPECIALBUILD" />
<Add option="-DDLL_BUILD" />
</Compiler>
</Target>
resource.h
...
// Unique IDs for each image resource.
#define KNOB_ID 101
// Image resource locations for this plug.
...
IPlugEffect.rc
#include "resource.h"
KNOB_ID PNG KNOB_FN
#define KNOB_FN "resources/img/knob.png"
problem solved. My dll symbol exports/visibility were not correct for gcc.
http://forum.cockos.com/showpost.php?p=835609&postcount=21

Resources