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'
}
Related
I have a problem with Gradle !!
It keeps showing me errors , can some one help me to resolve this problem
Note: It's my first time to install android studio
Try using this:
compile 'com.android.support:appcompat-v7:24.1.0'
Use latest support library and change your target and compile sdk also
compileSdkVersion 24
buildToolsVersion "24.0.1"
targetSdkVersion 24
Try it
compile "com.android.support:appcompat-v7:23.0.1"
and you can change targetSdkVersion 23
Please use my project gradle values and also update sdk libraries:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
multiDexEnabled true
applicationId "com.example.student" //change as your package name
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.0.1'
}
Try to match all versions:
compileSdkVersion 23
buildToolsVersion '23.0.0'
targetSdkVersion 23
Add Following dependencies:
compile 'com.android.support:appcompat-v7:23.0.0'
Make sure you use latest version of Sdk:
how to update sdk
The problem is you're using
compile 'com.android.support:appcompat-v7:19.+'
which gives you all possibilities of Android 4.4.2 Kitkat API 19 and older.
In your project you're trying to use Material Themes which belongs to newer version, I mean com.android.support:appcompat:$version, where version > 21.
Material Design was introduced with Android 5.1 Lollipop API 21
I higly reccomend you to change your build.gradle file to:
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.2"
defaultConfig {
minSdkVersion 21
targetSdkVersion 21
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:24.2.1"
}
but of course changing appcompat library to version :
com.android.support:appcompat-v7:23.0.1"
would be enough ;-)
Hope it would help
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
I'm new to android and developing android application of password manager. I started working in Ubuntu android studio and due to some problem I switched to windows 10 but Unable to import project showing error of app:compileDebugAidl or Aidl is missing. I tried to change version from 23.2.0 to 21.0.2 or 21.0.0 but unable to solve. please suggest
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.example.devil.password"
minSdkVersion 15
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.0'
}
Due to some problems with permissions in SDK API 23 (Marshmallow) I wanted to switch back to API 21, yet I'm encountering some issues... I've read so many posts with similiar problems and tried (almost I guess) everything: I've updated all SDK Build/Platform Tools, features for API 21, Suport and Repository Libraries. Then I've cleaned up the project, rebuilt it and synchronized. Yet, I'm getting those errors:
My build.gradle looks like following:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.example.pablo.appcontacts"
minSdkVersion 19
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.android.support:appcompat-v7:23.1.1'
}
I'm not very familiar with this, can anybody help me to fix this cause I really can't find a way to..?
3 Steps:
1 Edit build.grade
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.stackoverflow.answer"
minSdkVersion 16
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dependencies {
androidTestCompile 'junit:junit:4.12'
compile fileTree(dir: 'libs', include: ['*.jar'])
}
2 Sync gradle button
3 Rebuild project
I'm trying to add CardView support into my app for devices lower than Android L by adding the line:
compile 'com.android.support:cardview-v7:21.+'
I've then added compileSdkVersion and targetSdkVersion to 'android-L'
Now, unless I am mistaken, I thought that this would have built on my Nexus 5 in 4.4.4, however I get the error
Failure [INSTALL_FAILED_OLDER_SDK]
Am I missing something or misunderstood this? Full build.gradle below:
apply plugin: 'com.android.application'
android {
compileSdkVersion 'android-L'
buildToolsVersion "20.0.0"
defaultConfig {
applicationId "com.gh.app"
minSdkVersion 15
targetSdkVersion 'android-L'
versionCode 1
versionName "1.0"
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
wearApp project(':wear')
compile 'com.google.android.gms:play-services-wearable:+'
compile 'com.android.support:support-v4:20.0+'
compile files('libs/TalkClient.jar')
compile 'com.android.support:cardview-v7:21.+'
}
While CardView and RecyclerView are both new widgets being added to the support library (and therefore will be available on API 7+ devices), during the developer preview they are limited to Android L devices only.