`7 issues were found when checking AAR metadata:
Dependency 'androidx.appcompat:appcompat-resources:1.6.0' requires libraries and applications that
depend on it to compile against version 33 or later of the
Android APIs.
:app is currently compiled against android-32.
Recommended action: Update this project to use a newer compileSdkVersion
of at least 33, for example 33.
Note that updating a library or application's compileSdkVersion (which
allows newer APIs to be used) can be done separately from updating
targetSdkVersion (which opts the app in to new runtime behavior) and
minSdkVersion (which determines which devices the app can be installed
on).
Dependency 'androidx.appcompat:appcompat:1.6.0' requires libraries and applications that
depend on it to compile against version 33 or later of the
Android APIs.
:app is currently compiled against android-32.
Recommended action: Update this project to use a newer compileSdkVersion
of at least 33, for example 33.
Note that updating a library or application's compileSdkVersion (which
allows newer APIs to be used) can be done separately from updating
targetSdkVersion (which opts the app in to new runtime behavior) and
minSdkVersion (which determines which devices the app can be installed
on).
Dependency 'androidx.activity:activity:1.6.0' requires libraries and applications that
depend on it to compile against version 33 or later of the
Android APIs.
:app is currently compiled against android-32.
Recommended action: Update this project to use a newer compileSdkVersion
of at least 33, for example 33.
Note that updating a library or application's compileSdkVersion (which
allows newer APIs to be used) can be done separately from updating
targetSdkVersion (which opts the app in to new runtime behavior) and
minSdkVersion (which determines which devices the app can be installed
on).
Dependency 'androidx.activity:activity-ktx:1.6.0' requires libraries and applications that
depend on it to compile against version 33 or later of the
Android APIs.
:app is currently compiled against android-32.
Recommended action: Update this project to use a newer compileSdkVersion
of at least 33, for example 33.
Note that updating a library or application's compileSdkVersion (which
allows newer APIs to be used) can be done separately from updating
targetSdkVersion (which opts the app in to new runtime behavior) and
minSdkVersion (which determines which devices the app can be installed
on).
Dependency 'androidx.core:core-ktx:1.9.0' requires libraries and applications that
depend on it to compile against version 33 or later of the
Android APIs.
:app is currently compiled against android-32.
Recommended action: Update this project to use a newer compileSdkVersion
of at least 33, for example 33.
Note that updating a library or application's compileSdkVersion (which
allows newer APIs to be used) can be done separately from updating
targetSdkVersion (which opts the app in to new runtime behavior) and
minSdkVersion (which determines which devices the app can be installed
on).
Dependency 'androidx.core:core:1.9.0' requires libraries and applications that
depend on it to compile against version 33 or later of the
Android APIs.
:app is currently compiled against android-32.
Recommended action: Update this project to use a newer compileSdkVersion
of at least 33, for example 33.
Note that updating a library or application's compileSdkVersion (which
allows newer APIs to be used) can be done separately from updating
targetSdkVersion (which opts the app in to new runtime behavior) and
minSdkVersion (which determines which devices the app can be installed
on).
Dependency 'androidx.annotation:annotation-experimental:1.3.0' requires libraries and applications that
depend on it to compile against version 33 or later of the
Android APIs.
:app is currently compiled against android-32.
Recommended action: Update th
type here
is project to use a newer compileSdkVersion
of at least 33, for example 33.
Note that updating a library or application's compileSdkVersion (which
allows newer APIs to be used) can be done separately from updating
targetSdkVersion (which opts the app in to new runtime behavior) and
minSdkVersion (which determines which devices the app can be installed
on).
Hey I am trying to run my application and I am getting this error`
Related
I'm programming for one specific device and I'm having trouble understanding how I should be setting minsdkversion, compilesdkversion, and targetsdkversion. I want to get a compiler error when I'm using a library that doesn't exist for API level 25. Here's what I gatherered. Minsdkversion prevents calling API that doesn't exist for API version. Compilesdkversion should always be the latest version. Targetsdkversion is what the app was tested against (don't understand what this means).
minsdkversion-25
compilesdkversion-28 (needed for AndroidX)
targetSDKversion-25
Version settings
Among those version settings, only minSdkVersion takes effect to detect API level error. If you'd like to know details of the version settings, see documentation.
How to let build system report API level error
For release builds, place "lintOptions" in app/build.gradle and mark "NewApi" as "fatal". Then lintVitalRelease gradle task reports error during compilation.
android {
lintOptions {
fatal "NewApi"
}
compileSdkVersion 30
defaultConfig {
minSdkVersion 25
targetSdkVersion 30
:
}
:
}
Checking API level manually
In debug builds, the lintOptions above doesn't have any effects because the lint is not included in debug build tasks (there is no lintVitalDebug gradle task). So rather, after coding, run "code inspection" manually to detect all the NewApi problems in your code. If incompatible API uses found, you'll see "calling new methods on older version" error in the inspection result.
Build fails when switching to buildTooolsVersion 24.0.3 or higher with
error messages relating to Default methods and Static methods "not supported in Android API level less than 24"
Works fine in previous versions of Build Tools, up to 24.0.2
I am using Jack, and Google play-services.
However, the complaints are about code in java.util and java.lang For example:
Error:SortedSet.java:36-37: Default method java.util.Spliterator spliterator() not supported in Android API level less than 24.0.2
Error:Stream.java:68-69: Static method java.util.stream.Stream$Builder builder() not supported in Android API level less than 24
minSdkVersion 17
targetSdkVersion 24
I switched my android studio to use the packaged java 8 version.
When I switched to java 8 I had added the jack enabled and version to 8, but this broke everything for a release build.
I then switched this from true to false.
jackOptions {
enabled false
}
I then set this from 8 to 7.
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
I am guessing as long as your code and the libraries you include in your project will work for java 7, your code should build for release.
If this doesn't work and you must use those java functions, it would seem that you will need to move you min version up to 24.
I am trying to run an app that has a Google Maps Activity on my phone. My phone's running on Android 4.1.3 and the Minimum SDK for my project is API 15: Android 4.0.3
I just created the project on Android Studio and tried to run it on my phone. But it won't run and I am keep getting this error. Can someone tell me how to solve this?
That error probably means that you are using too much libraries. And because you are trying to use google maps I'm guessing you included everything google.
Try to just use the libraries you need.
For maps use this:
dependencies {
com.google.android.gms:play-services-maps:9.2.1
}
Reading material:
https://developers.google.com/android/guides/setup
You need to configure your gradle for multidex.
Modify the module-level build.gradle file configuration to include the support library and enable multidex output, as shown in the following code snippet:
android {
compileSdkVersion 21
buildToolsVersion "21.1.0"
defaultConfig {
...
minSdkVersion 14
targetSdkVersion 21
...
// Enabling multidex support.
multiDexEnabled true
}
...
}
dependencies {
compile 'com.android.support:multidex:1.0.0'
}
See more on same link which you are refering : https://developer.android.com/studio/build/multidex.html#mdex-gradle
You can also see some related question for same error:
How to enable multidexing with the new Android Multidex support library
Android java.exe finished with non-zero exit value 1
This issue has been incredibly frustrating for me for the past two weeks.
Using the Android SDK Manager, I updated the following:
Tools:
Android SDK Tools rev. 24.3.3
Android SDK Platform-tools rev. 22
Android SDK Build-tools rev. 22.0.1
Android 5.1.1 (API 22):
SDK Platform rev. 2
Google APIs rev. 1
Sources for Android SDK rev. 1
Extras:
Android Support Repository rev. 16
Android Support Library rev. 22.2.1
Google Repository rev.22
This is the exact list of all the repositories that I've installed and updated to with the Android SDK Manager.
However, when I attempt to add the line:
compile 'com.android.support:design:22.2.0'
Gradle becomes stuck on addDependecies. Furthermore, when I go to Module Settings, and then to Dependencies, when I try to add a new library, the 'com.android.support:design:22.2.0' does not appear within the list!
Here's additional information about my target, compile, and minimum SDK version:
android {
compileSdkVersion 22
buildToolsVersion '22.0.1'
defaultConfig {
applicationId "com.myandroidapplication.newtestapp"
minSdkVersion 14
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
What could I possibly be missing at this point? Thank you!
You have to use version 22.2.1 as it has installed on your computer.
compile 'com.android.support:design:22.2.1'
For me, I was initially adding the support library dependency by typing it out in the build.gradle of my app directly.
I cleaned the line that I had typed and added the dependency through the android studio GUI,
Go to File
Choose Project Structure
Click on the Dependencies tab
Click on the + symbol in the upper right conner and choose Library Dependency.
Search for and add the support library in the dialog that appears
Gradle build/sync should start automatically.
Don't know why, but it works for me at least.
I'm developing an App in Android studio. And I want use a Google maps API, but I can't use UI to configure project settings. I tried some different instruction to add maps, but it didn't work. I have to modify somehow build.gradle file? Can you tell me how? Does someone have experience with that?
Thanks for every advice.
If you are on 0.2 it means that you already have Google Repository and Android Repository installed(from Android SDK: terminal$ android sdk).
One of them, has the Google Play services.
Here is a full build.gradle for your module:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
apply plugin: 'android'
dependencies {
compile 'com.google.android.gms:play-services:3.1.36'
}
android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
defaultConfig {
minSdkVersion 8
targetSdkVersion 16
}
}
Notice how(easily) the play services can be included.
Also gradle version is 0.5.+ so it can be auto updated!
Also another VERY important thing, that wasted me a lot of time is the minimum sdk version!
It must be 8 or above, since google play services aren't supported for lower versions!