First, the Pinyin of "中文" needn't be capitalized. It should be "zhōngwén" because it is just an ordinary noun in Chinese, I guess.
Second, the word "一直" should be read as "yìzhí" rather than "yīzhí". The character "一" can be read as yī, yí and yì. The high-level tone "yī" only shows when "一" is used as a cardinal or a ordinal.
Third, your first sentence "我一直在学习中文。" is grammatically correct. However, this sentence can express two meanings: "I am learning Chinese now and I didn't do other things since I started learning." or "I have been learning Chinese for a period of time and maybe now I am not learning." So maybe you need some extra adverbs of time.
Your second sentence "我一直学习中文。" is also grammatically correct. But it lacks for something to tell others what's going on so it makes people confused. You can be understood but native Chinese speakers won't say it like this. You need to add something to express a complete information.
For example, you may say "我一直学习中文,却毫无进步。" (Wǒ yìzhí xuéxí zhōngwén, què háowú jìnbù., I have been learning Chinese for a long time but it didn't seem to be improved at all.)