My application is not launched in Android Emulator - android-studio

I am new to the development of mobile applications with Android.
The Kotlin application once built, does not appear in the android-studio emulator (Pixel XL API 30: Android 11.0 (Google API))
ADB is unable to debug the application:
$ adb shell am start -n "paris.ksainthi.soundpark/paris.ksainthi.soundpark.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Timed out waiting for process (paris.ksainthi.soundpark) to appear on Pixel_XL_API_30 [emulator-5554].
The application is present in the list of applications in the configuration. But it is not on the home, nor launched.
Here is my build.gradle file:
plugins {
id 'com.android.application'
id 'kotlin-android'
}
android {
compileSdkVersion 31
buildToolsVersion '30.0.2'
defaultConfig {
applicationId "paris.ksainthi.soundpark"
minSdkVersion 16
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
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'
}
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
implementation 'androidx.core:core-ktx:1.6.0'
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'com.google.android.material:material:1.5.0-alpha02'
}
Here is the configuration of my application:
Deploy: Default APK
Launch: Specified Activity, paris.ksainthi.soundpark.MainActivity

Related

After updating compileSdk to version 33, part of the attributes in design stopped being displayed

After updating the androidx.appcompat library:appcompat:1.5.1 to version 1.6.0 android studio gave me this error message:
error message
I have updated compileSdk and versionSdk from version 32 to version 33. After that, most of the attributes were no longer displayed in the Design mode for the elements.
attributes before | attributes after
build.gradle (app):
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'com.google.gms.google-services'
}
android {
compileSdk 33
defaultConfig {
applicationId "com.gramzin.kilo"
minSdk 21
targetSdk 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
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 {
implementation platform('com.google.firebase:firebase-bom:31.2.0')
implementation 'androidx.appcompat:appcompat:1.6.0'
implementation 'androidx.core:core-ktx:1.7.0'
implementation 'com.google.android.material:material:1.7.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
implementation 'com.google.firebase:firebase-database-ktx:20.1.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
implementation 'com.google.firebase:firebase-auth-ktx'
implementation 'androidx.activity:activity-ktx:1.5.1'
}
I tried changing the gradle version to 7.4.2 and the android gradle plugin version to 7.2.2, but it doesn't help.
I updated android studio and gradle to the latest version and everything worked

i am getting error in Gradle of Android Studio

I am developing a music player app since 10 days. Recently, Android Studio asked me to update but after updating there are some gradle and code errors showing.
the error message due to 200 lines i am able to give here is i upload image
I tried all ways to solve but I have no other option so please tell me the solve
Here are the gradle details
plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
}
android {
namespace 'com.example.h3mplayer'
compileSdk 33
defaultConfig {
applicationId "com.example.h3mplayer"
minSdk 21
targetSdk 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
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 {
implementation 'androidx.core:core-ktx:1.9.0'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.8.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
implementation 'androidx.media:media:1.6.1'
implementation "android.arch.lifecycle:extensions:1.1.1"
dependencies {
implementation 'com.github.bumptech.glide:glide:4.14.2'
annotationProcessor 'com.github.bumptech.glide:compiler:4.14.2'
}
}
I tried the last gradle version but also showing some error please help me out

Can not extract resource from com.android.aaptcompiler.ParsedResource#51dfe79f

This error is coming when i build my app,please help
This is gradle code:
applicationId "com.example.rubychatbot"
minSdk 21
targetSdk 33
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildToolsVersion '33.0.1'
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'com.squareup.retrofit2:retrofit:2.9.0'
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
implementation 'com.google.android.material:material:1.7.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'
implementation "app.alan:sdk:4.12.0"
}
I tried to change sdk version but does'nt help.
Execution failed for task ':app:mergeDebugResources'.
A failure occurred while executing com.android.build.gradle.internal.res.ResourceCompilerRunnable
Resource compilation failed (Failed to compile values resource file E:\Rubychatbot\app\build\intermediates\incremental\debug\mergeDebugResources\merged.dir\values\values.xml. Cause: java.lang.IllegalStateException: Can not extract resource from com.android.aaptcompiler.ParsedResource#51dfe79f.). Check logs for more details.

Could not resolve all files for configuration ':app:debugRuntimeClasspath'. error in android studio version dolphin 2021.3.1

My Android Studio Current version Dolphin 2021.3.1 patch 1, in my project I am getting following build error in empty project while adding a fresh dependency. ie.
implementation 'io.github.amrdeveloper:codeview:1.3.7'
getting from here >>> https://amrdeveloper.github.io/CodeView/install/#main-features
I have already checked lots of Solutions related this question but no luck.
build.gradle:project
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id 'com.android.application' version '7.3.1' apply false
id 'com.android.library' version '7.3.1' apply false
}
build.gradle:module
plugins {
id 'com.android.application'
}
android {
namespace 'com.myvpn.myapp'
compileSdk 32
defaultConfig {
applicationId "com.myvpn.myapp"
minSdk 21
targetSdk 32
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation 'com.google.android.material:material:1.7.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'
//added these two dependencies
implementation 'io.github.amrdeveloper:codeview:1.3.7'
implementation 'com.github.AmrDeveloper:CodeView:1.3.7'
}
Build Output.
enter image description here
i have tried turn off the Toggle Offline Mode .
enter image description here

Execution failed for task ':app:mergeDebugResources' occur while running the app

I am a beginner in android studio. When I try to run the app on my mobile phone, android studio shows me this error:
"execution failed for task ':app:mergedebugresources'. A failure
occurred while executing
com.android.build.gradle.internal.res.ResourceCompilerRunnable"
My build gradle(app):
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 30
defaultConfig {
applicationId "com.example.newlogin2"
minSdkVersion 16
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
aaptOptions{
cruncherEnabled = false
useNewCruncher = false
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'com.google.firebase:firebase-auth:21.0.1'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'com.rengwuxian.materialedittext:library:2.1.4'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'androidx.recyclerview:recyclerview-selection:1.1.0'
implementation platform('com.google.firebase:firebase-bom:28.2.0')
implementation 'com.google.firebase:firebase-analytics'
}
Any one can help please? Thank you!
Check your code if you follow some tutorials and then
go to
file -> invalidate caches/Restart

Resources