Intellij IDEA - Too many errors on the project creation
Hello. I want to study and learn how to create Android apps using the Kotlin language. For this, I decided to use the IntelliJ IDEA platform. However, I am having a lot of difficulties before I even start my studies.
I installed Intellij IEA in the "ideaIC-2019.2.3" version on a newly installed Windows 10 Pro x64 computer as it was formatted for Intellij IDEA installation.
The installation was done without any problem. After that, when trying to create my first project, the program downloaded and installed a series of SDK file packages, which happened without any problems.
After installing the SDK, the program created my first project and in its tabs it opened two files for me: ACTIVITY_MAIN.XML and MAINACTIVITY.KT. Both open files already have some code created automatically by the program.
However, from the beginning, the program points out some errors in the code that it itself generated when it created the project. Below I will leave you the code automatically generated for each of the files and highlight in bold letters the errors pointed out in each line of programming:
ACTIVITY_MAIN.XML
------------------------------

<? xml version = "1.0" encoding = "utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns: android = "http://schemas.android.com/apk/res/android" --> Resource registered by this uri is not recognized (Settings | Languages and frameworks | Schemas and DTDs)
xmlns: tools = "http://schemas.android.com/tools" --> URl is not registered (Settings | Languages and frameworks | Schemas and DTDs)
xmlns: app = "http://schemas.android.com/apk/res-auto" --> URl is not registered (Settings | Languages and frameworks | Schemas and DTDs)
android: layout_width = "match_parent" --> Attribute android:layout_width is not allowed here
android: layout_height = "match_parent" --> Attribute android:layout_height is not allowed here
tools: context = ". MainActivity"> --> Attribute tools:context is not allowed here
<TextView --> Element TextView is not allowed here
android: layout_width = "wrap_content"
android: layout_height = "wrap_content"
android: text = "Hello World!"
app: layout_constraintBottom_toBottomOf = "parent"
app: layout_constraintLeft_toLeftOf = "parent"
app: layout_constraintRight_toRightOf = "parent"
app: layout_constraintTop_toTopOf = "parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
MAINACTIVITY.KT (It file don't have any errors)
--------------------------

package br.com.regionalissimo.helloworld
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
class MainActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
}
}
However, when opening this other file, I noticed that it is also full of errors as follows:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" --> Resource registered by this uri is not recognized (Settings | Languages and frameworks | Schemas and DTDs)
package="br.com.regionalissimo.helloworld">
<application
android:allowBackup="true" --> Attribute android:layout_height is not allowed here
android:icon="@mipmap/ic_launcher" --> Attribute android:icon is not allowed here
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round" --> Attribute android:roundIcon is not allowed here
android:supportsRtl="true" --> Attribute android:supportsRtl is not allowed here
android:theme="@style/AppTheme"> --> Attribute android:theme is not allowed here
<activity android:name=".MainActivity"> --> Unresolved class 'MainActivity' more... (Ctrl + F1)
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
It's been two days that I've been trying to solve this problem and I can't. I have installed and dismantled the program several times, even formatted the computer twice, but these errors persist in tormenting me and preventing me from studying, according to my goal.
I count on the help of you who already have experience with this program to guide me in the solution of this program. Brazilian greetings. Thanks.
(PS: Sorry for my bad English, I hope you understand me)
Please sign in to leave a comment.
The project sync failed, so it was not created properly. See idea.log for errors: Help | Compress Logs and Show in ...
Try using Android Studio instead.
Anyway, as I couldn't find this solution, I followed your second suggestion, and installed Android Studio. But to my surprise in this other program I encounter the same problems, very similar indeed.
I send you some prints to see my current situation also in Android Studio:
Have you any suggestions about how can I solve these small issues, which recur equally in both Intellij and Android Studio?
Please share the logs via https://uploads.services.jetbrains.com/.
I have uploaded the ZIP file that contains the logs generated by Android Studio. The uploaded file name is studio-logs-20191004-071229.zip
I am available for any clarifications that may be required. I am grateful for all your attention and collaboration. Thanks.
You have some networking issue with downloading Gradle from https://services.gradle.org/distributions/gradle-5.4.1-all.zip. SSL connection is reset:
Caused by: javax.net.ssl.SSLException: java.net.SocketException: Connection reset
Make sure IDE can download the files from HTTPS links.
You may need to adjust the proxy settings to use some other proxy which permits HTTPS connections: https://www.jetbrains.com/help/idea/settings-http-proxy.html .