it works if you change to int,address (which doesn't have a dynamic size as the string)or bytesX (fixed byte array)
string[] public myArray;
function myContract (int[] myArray) {
}
so to understand why there is 2 answers :
1-in the doc :
generic arrays of fixed and dynamic size are supported in calldata and
storage with the following features: Index access, copying (from
calldata to storage, inside storage, both including implicit type
conversion), enlarging and shrinking and deleting. Not supported are
memory-based arrays (i.e. usage in non-external functions or local
variables)
2-
Solidity doesn't have a built-in way yet to deserialize string arrays.
It can cheat when the contract is passing an array it created itself
to itself, which is why it works with private functions. But if you
want to take string arrays from the outside, you're going to have to
handle the serialization and deserialization from a string (or bytes)
yourself. (E.g., concatenating fixed-length items, or using null
characters as separators, or using commas, etc.)
source: Is it impossible to use an array of strings as the argument to solidity function?