Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android build warning Mapping new ns to old ns

I created a new project in android studio and added all the dependencies. All of them are latest. When I built the project I am getting these warnings. There is no code in the app. These started showing after I added the dependencies.

Should I just leave it like this?

Sync output

plugins {     id 'com.android.application'     id 'kotlin-android'     id 'kotlin-kapt'     id 'dagger.hilt.android.plugin' }  android {     compileSdkVersion 30     buildToolsVersion "30.0.3"      buildTypes {         release {             minifyEnabled false             proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'         }     }     compileOptions {         sourceCompatibility JavaVersion.VERSION_1_8         targetCompatibility JavaVersion.VERSION_1_8     }     kotlinOptions {         jvmTarget = '1.8'     }     buildFeatures {         viewBinding = true     } }  dependencies {      def version_nav = "2.3.4"     def lifecycle_version = "2.3.0"     def version_retrofit_coroutines_adapter = "0.9.2"     def version_kotlin_coroutines = "1.3.9"     def version_moshi = "1.9.2"     def retrofit ="2.9.0"     def hilt_version = "2.31-alpha"     def hilt_viewmodels = "1.0.0-alpha03"     def fragment_ktx = "1.3.1"     def okhttp = "4.9.0"     def moshi_converter = "2.8.1"     def recycler_view_version = "1.2.0-beta02"     def timber_version = "4.7.1"     def java_poet_version = "1.13.0"     def coil_version = "1.1.1"       implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"     implementation 'androidx.core:core-ktx:1.3.2'     implementation 'androidx.appcompat:appcompat:1.2.0'     implementation 'com.google.android.material:material:1.3.0'     implementation 'androidx.constraintlayout:constraintlayout:2.0.4'     testImplementation 'junit:junit:4.13.2'     androidTestImplementation 'androidx.test.ext:junit:1.1.2'     androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'      // Timber     implementation "com.jakewharton.timber:timber:$timber_version"      implementation "com.squareup.retrofit2:retrofit:$retrofit"     implementation "com.squareup.retrofit2:converter-gson:$retrofit"      // Moshi     implementation "com.squareup.moshi:moshi:$version_moshi"     implementation "com.squareup.moshi:moshi-kotlin:$version_moshi"     implementation "com.squareup.retrofit2:converter-moshi:$moshi_converter"      // Navigation     implementation "androidx.navigation:navigation-fragment-ktx:$version_nav"     implementation "androidx.navigation:navigation-ui-ktx:$version_nav"      // Coroutines     implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$version_kotlin_coroutines"     implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$version_kotlin_coroutines"      // Retrofit Coroutines Support     implementation "com.jakewharton.retrofit:retrofit2-kotlin-coroutines-adapter:$version_retrofit_coroutines_adapter"      //RecyclerView     implementation "androidx.recyclerview:recyclerview:$recycler_view_version"      // ViewModel     implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"     // LiveData     implementation "androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version"     // Lifecycle only (without ViewModel or LiveData)     implementation "androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version"      //OkHttp3     implementation"com.squareup.okhttp3:okhttp:$okhttp"      //Hilt     implementation "com.google.dagger:hilt-android:$hilt_version"     kapt "com.google.dagger:hilt-android-compiler:$hilt_version"      //Hilt View models     implementation "androidx.hilt:hilt-lifecycle-viewmodel:$hilt_viewmodels"     kapt "androidx.hilt:hilt-compiler:$hilt_viewmodels"      //Fragments     implementation "androidx.fragment:fragment-ktx:$fragment_ktx"      //Java Poet     kapt "com.squareup:javapoet:$java_poet_version"      //Coil     implementation "io.coil-kt:coil:$coil_version"  }  kapt {     correctErrorTypes true } 

The app is run without any issues but since this is a warning I have seen first time. I couldn't find anything related anywhere else, wanted to know why this is happening.

like image 701
Vishal Kashi Avatar asked Mar 20 '21 14:03

Vishal Kashi


People also ask

How do I change my Buildtoolsversion?

To download it, go to Tools > Android > SDK Manager, then click on the "SDK Tools" tab at the top of the new window. Then select the "Show Package Details" checkbox in the lower right-hand corner.


Video Answer


1 Answers

I had the same issue and turned out that the buildToolsVersion "30.0.3" used is not installed, so I switched to the installed buildToolsVersion "29.0.3" (in my case) and the warning disappeared.

like image 105
Ibrahim Hassan Avatar answered Sep 28 '22 03:09

Ibrahim Hassan