apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "com.example.aclientz.aclientzcds"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
debug {
debuggable true
}
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'
}
I develop an android application in android studio.Created a signed buindle apk and install my phone (android 5.0) work perfactly but its not working in andoid 5.0+ version. How to avoid this problems, pLease give suggestion
Please Check for runtime permission if you have any permission uses camera or contact which require runtime permission (link)
or for checking purpose please set your targetsdk to 22
Related
I just made an application using Android Studio 3.6, I tested using API 29, the application can be installed, but when I ask my friend to test on his device (Android 6.0) the application is not installed, so my application can only be installed on Android 7.0 and above, I want old Android users to be able to use my application. This is build.gradle that I use
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "com.my.app"
minSdkVersion 21
targetSdkVersion 29
versionCode 10
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
...
}
I have tried to downgrade the target SDK but it still cannot be installed
I have a problem when I try to run my application on android device that uses API level 19 (Android 4.4.2). When I run the app on API>21 it works perfectly fine.
The errors I'm getting:
I tried setting buildToolsVersion to 19.1.0 instead of 23.0.3 but then I can't use MultiDex and I can't build the app without it.
here is my build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 19
buildToolsVersion '23.0.3'
defaultConfig {
applicationId "multisoft.testsurfaceview"
minSdkVersion 19
targetSdkVersion 19
versionCode 1
multiDexEnabled true
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
javaMaxHeapSize "4g"
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:19.0.0'
compile files('/Users/admin/Desktop/Projects/testsurfaceview/libs/classes.jar')
}
I can't seem to find where the problem could be, any suggestions?
remove this compile files('/Users/admin/Desktop/Projects/testsurfaceview/libs/classes.jar') from dependencies.
And just add the jar in libs folder and tried it..
see this link you will find your answer.
basically you did not configure multidex properly.
enter link description here
In Android Studio the Emulators are not showing . I tried that disabling ADB Integration. but it is not working for me.
Please give me solution for this problem.
Maybe your project is not compatible (API version) with the target emulator. Check build.gradle file if the targetSDK and minimumSdk version is lower or equal to the sdk version of your Emulator.
Be sure that your compiledSdkVersion matches minSdkVersion and supported by targetSdkVersion. For example:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "24.0.0"
defaultConfig {
applicationId "zeta.sqlitetest3"
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'
}
Pls help,this is my first app and i have been having serious issues in installing the app on my phone:
After building the apk of my app it takes forever to install on my phone.
I have searched for solutions but none worked for me. My device is huwaie P6 running Jellybean v4,2.
this is my build.gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "24.0.1"
defaultConfig {
applicationId "com.micheal.stephen.geo"
minSdkVersion 17
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'
}
pls what might be the problem?
Thank you all, i actually did a phone restart and it worked fine.
I am building apk with L code base , this app uses android.permission.READ_PHONE_STATE ,it is working fine in M devices also .
But when i build same app with same permission ,android M prompts for User concern ,is there any way to by enable these permission without user concern .
My app is system app .
If you want to use any new feature of Android API 23, It's not possible.
Beginning in Android 6.0 (API level 23), users grant permissions to apps while the app is running, not when they install the app. This approach streamlines the app install process, since the user does not need to grant permissions when they install or update the app. It also gives the user more control over the app's functionality; for example, a user could choose to give a camera app access to the camera but not to the device location. The user can revoke the permissions at any time, by going to the app's Settings screen.
In other case you can downgrade the Android API to 22 but It's not recommended...
You should change your build.gradle from something like this:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "your.app.id"
minSdkVersion 17
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.2.1'
compile 'com.android.support:design:23.2.1'
}
to something like this:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "you.app.id"
minSdkVersion 17
targetSdkVersion 22
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:22.2.1'
compile 'com.android.support:design:22.2.0'
}
Remember to compile only android library version 22 or lower in dependencies like this one 'com.android.support:design:22.2.0'