Uploaded debug symbols for Android App Bundle - android-studio

Warning - This App Bundle contains native code, and you've not uploaded debug symbols. We recommend that you upload a symbol file to make your crashes and ANRs easier to analyse and debug.
This message in Playconsole while releasing a Internal test in .aab (Android Studio)
defaultConfig {
applicationId "com........"
minSdk 21
targetSdk 33
multiDexEnabled true
versionCode 2
versionName "2.2"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
Gradle -
classpath 'com.google.gms:google-services:4.3.14'
Where should I add
android.buildTypes.release.ndk.debugSymbolLevel = { SYMBOL_TABLE | FULL }
for Automatic symbol file attachment in .aab ?

Related

android libraries errors

i am working on an android studio project, when i run the project it crashes immedietly, i tried to debug and i found that the problem is in the methods i use from the android libraries as in the pic here
(https://i.stack.imgur.com/a6bKI.png)
i updated the android SDK
repaired the IDE
added the depencencies needed to the build.gradle file but the problem is not solved
bellow is the build.gradle
plugins {
id 'com.android.application'
}
android {
namespace 'com.example.readerapp'
compileSdk 33
defaultConfig {
applicationId "com.example.readerapp"
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
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.5.1'
implementation "androidx.annotation:annotation:1.5.0"
implementation "androidx.constraintlayout:constraintlayout:2.1.4"
implementation "androidx.constraintlayout:constraintlayout-compose:1.0.1"
implementation 'com.google.android.material:material:1.5.0'
implementation files('libs\\uhfcom13_eu_v15.jar')
implementation files('libs\\SerialPort.jar')
}
Go To: File->Invalidate Caches-> Rebuild Project
I faced the same issue and that fixed my problem.
implementation files('libs\\uhfcom13_eu_v15.jar')
implementation files('libs\\SerialPort.jar')
Replace with:
implementation files('libs\uhfcom13_eu_v15.jar')
implementation files('libs\SerialPort.jar')

How to compile a module as an AAR and include it in the project in one build?

I have an app module and a module that I'm using as a library -- I'm still making changes to the library, so it isn't precompiled. The library module has its own res folder, which I'd like to keep separate from the main app's res folder. I believe the only way to do this is to package the library as an aar before including it in the main app. It would be convenient if I could run a single Gradle build to package the library and include it. Is this possible?
gradle.build for app (which compiles "my-library"):
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.app.id"
minSdkVersion 18
targetSdkVersion 25
versionCode 5
versionName "1.4"
}
sourceSets {
main {
assets.srcDirs = [project.ext.ASSET_DIR]
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile project(':my-library')
}
gradle.build for my-library:
apply plugin: 'com.android.library'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
minSdkVersion 18
targetSdkVersion 25
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
It turns out that Android Studio is smart enough handle a library module with a res folder. My error was coming from a conflict in the Manifest files.

How can I solve Android studio API platform

When I create a new project in Android studio I chose 2.3 for API level but when the project installed in platform 4.0.0 it stopped! It works just in 5.0.0 to up!
here is my gradle moudle code and there is no error!!`apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.example.milad_admin.counter"
minSdkVersion 9
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.2.1'
}
`

Cannot find <stdio.h> in android studio project

i am trying to run FM radio project in android sudio but it gives me error
(i downloaded this project from this git https://github.com/mikereidis/spirit2_free)
IMAGE : Android studio + Cannot find stdio.h
here is my gradle file settings
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.testFM"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
}
and here is the local.properties file where NDK path is declared
ndk.dir=C\:\\Users\\*****\\AppData\\Local\\Android\\sdk\\ndk-bundle
sdk.dir=C\:\\Users\\*****\\AppData\\Local\\Android\\sdk
Please help
Thanks
Try to run File->Invalidate Caches / Restart...

Test running failed: Permission Denial: starting instrumentation ComponentInfo

Test running failed:
Permission Denial: starting instrumentation ComponentInfo{com.xxx.taskmanager.warehouse.tests/android.test.InstrumentationTestRunner} from pid=766, uid=766 not allowed because package com.xxx.taskmanager.warehouse.tests does not have a signature matching the target com.xxx.taskmanager.warehouse
Empty test suite.
This is my app.gradle file
apply plugin: 'android-sdk-manager'
apply plugin: 'com.android.application'
android {
signingConfigs {
release
{
keyAlias 'xxx'
keyPassword 'xxx'
storeFile file('../keystore.jks')
storePassword 'xxx'
}
}
compileSdkVersion 16
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.xxx.taskmanager.warehouse"
minSdkVersion 16
targetSdkVersion 16
versionCode 3
versionName "3.0"
testApplicationId "com.xxx.taskmanager.warehouse.tests"
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/LICENSE'
exclude 'LICENSE'
exclude 'NOTICE'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/ASL2.0'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
}
applicationVariants.all { variant ->
variant.outputs.each { output ->
output.outputFile = new File(
output.outputFile.parent,
"FLO_HANDHELD_V${variant.versionName}.apk"
)
}
}
variantFilter { variant ->
if(variant.buildType.name.equals('debug')) {
variant.setIgnore(true);
}
}
productFlavors {
production_b2b {
applicationId "com.xxx.taskmanager.warehouse"
minSdkVersion 16
targetSdkVersion 16
versionCode 3
versionName "3.1-Prod-B2B"
}
stage_b2b {
applicationId "com.xxx.taskmanager.warehouse"
minSdkVersion 16
targetSdkVersion 16
versionCode 3
versionName "3.1-Stage-B2B"
}
production_b2c {
applicationId "com.xxx.taskmanager.warehouse"
minSdkVersion 16
targetSdkVersion 16
versionCode 3
versionName "3.1-Prod-B2C"
}
stage_b2c {
applicationId "com.xxx.taskmanager.warehouse"
minSdkVersion 16
targetSdkVersion 16
versionCode 3
versionName "3.1-Stage-B2C"
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile files ('libs/android-support-v7-appcompat.jar')
compile files('libs/android-support-v4.jar')
compile project(':taskmanagerlib')
compile files('libs/DataCollection.jar')
androidTestCompile fileTree(dir: 'libs', include: 'robotium-solo-5.3.0.jar')
}
task copyTask(type: Copy) {
from 'build/outputs/apk'
into 'apks'
exclude '**/*-unaligned.apk'
}
task deleteApk(type: org.gradle.api.tasks.Delete){
// delete 'apks'
}
task appBuild(dependsOn: ['deleteApk','clean', 'assembleRelease', 'copyTask']){
assembleRelease.mustRunAfter deleteApk
clean.mustRunAfter deleteApk
copyTask.mustRunAfter assembleRelease
}
I think this error is happening because I have not declared the signingConfigs for test package. If so , how do I declare it. ?
Please help!!
I have solved the issue. Answering it so that it can be useful for someone else.
Solution is for Android Studio :
For the tests to run , the build variant should be debug. Build Variants window is present in the left side of the android studio, if not activated then activate it by click on Build variants tab present on the left side of the android studio.
You either have to change your build variant to debug, or add a testBuildType to your android tag inside your build.gradle file. Like this:
android {
...
testBuildType "release"
}
Clean Your Project.
Uninstall app if already install.
Now Run your project.
It's Completely Working for me.
Had the same problem even with Android Studio 3.x years later. Previous answers did not work for me.
Only cure was to explicitly add the permissions to the test app on the phone.
It worked for me when changed Startapp code to use apk file instead of installed App.
i.e. from :
From :
return GetApp().InstalledApp(Settings.AUTPackageName).EnableLocalScreenshots().ConnectToApp();
To:
return GetApp().ApkFile(Settings.AUTPath).EnableLocalScreenshots().ConnectToApp();

Resources