error: Attribute application@appComponentFactory value=(androidx.core.app.CoreComponentFactory) from AndroidManifest.xml
poner en gradle.properties
android.enableJetifier=true
android.useAndroidX=true
error: Attribute application@appComponentFactory value=(androidx.core.app.CoreComponentFactory) from AndroidManifest.xml
poner en gradle.properties
android.enableJetifier=true
android.useAndroidX=true
Android Studio no reconoce las variables.
solucion:
ir a build.gradle (Module)
borrar todo plugins{ } aparece al principio y puede tener 2 id
remplazar por
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android:id="@+id/tvMainTitle"el id es tvMainTitle, este id puede ser referenciado mediante...
R.id.tvMainTitle
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="match_parent"> <TextView
android:id="@+id/tvMainTitle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="Hola Mundo!"/>
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:src="@drawable/ic_launcher_background"/>
<LinearLayout
android:layout_width="match_parent"
android:orientation="horizontal"
android:gravity="center"
android:layout_height="wrap_content">
<ImageView
android:layout_width="120dp"
android:layout_height="120dp"
android:src="@drawable/ic_filter_1_black_24dp"/>
<ImageView
android:layout_width="120dp"
android:layout_height="120dp"
android:src="@drawable/ic_filter_2_black_24dp"/>
<ImageView
android:layout_width="120dp"
android:layout_height="120dp"
android:src="@drawable/ic_filter_3_black_24dp"/>
</LinearLayout>
</LinearLayout>
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"> <ImageView
android:layout_width="240dp"
android:layout_height="200dp"
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:src="@drawable/rojo" /> <ImageView
android:id="@+id/ivMainVerde"
android:layout_width="150dp"
android:layout_height="370dp"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:src="@drawable/verde" /> <ImageView
android:layout_width="250dp"
android:layout_height="130dp"
android:layout_below="@+id/ivMainVerde"
android:src="@drawable/azul" /> <ImageView
android:layout_width="130dp"
android:layout_height="130dp"
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
android:src="@drawable/rosado" />
</RelativeLayout>