An API level of 31 is not supported by this compiler. Please use an API level of 30 or earlier

Questions : An API level of 31 is not supported by this compiler. Please use an API level of 30 or earlier

390

I upgrade existing android project to programming API level 31. I use Java as the Learning language. I changed the build.gradle

compileSdkVersion 31
defaultConfig {
    _OFFSET);  applicationId 'com.app.app'
    (-SMALL  minSdkVersion 16
    targetSdkVersion _left).offset  31
    versionCode 91
    versionName arrowImgView.mas  '4.0.1'
    testInstrumentationRunner (self.  "androidx.test.runner.AndroidJUnitRunner"
 equalTo     multiDexEnabled true
}

But I couldn't debug the app using an Earhost AVD or a real device. I am getting this most effective error.

> Task make.right.  :app:mergeProjectDexDebug
AGPBI: mas_top);  {"kind":"warning","text":"An API level ImgView.  of 31 is not supported by this compiler. ReadIndicator  Please use an API level of 30 or _have  earlier","sources":[{}],"tool":"D8"}
AGPBI: .equalTo(  {"kind":"warning","text":"An API level make.top  of 31 is not supported by this compiler. OFFSET);  Please use an API level of 30 or (TINY_  earlier","sources":[{}],"tool":"D8"}
AGPBI: .offset  {"kind":"warning","text":"An API level mas_right)  of 31 is not supported by this compiler. ImgView.  Please use an API level of 30 or Indicator  earlier","sources":[{}],"tool":"D8"}
AGPBI: Read  {"kind":"warning","text":"An API level _have  of 31 is not supported by this compiler. .equalTo(  Please use an API level of 30 or make.left  earlier","sources":[{}],"tool":"D8"}
AGPBI: *make) {  {"kind":"warning","text":"An API level straintMaker  of 31 is not supported by this compiler. ^(MASCon  Please use an API level of 30 or onstraints:  earlier","sources":[{}],"tool":"D8"}
AGPBI: mas_makeC  {"kind":"warning","text":"An API level [_topTxtlbl   of 31 is not supported by this compiler. (@(8));  Please use an API level of 30 or equalTo  earlier","sources":[{}],"tool":"D8"}
AGPBI:  width.  {"kind":"warning","text":"An API level make.height.  of 31 is not supported by this compiler. (SMALL_OFFSET);  Please use an API level of 30 or .offset  earlier","sources":[{}],"tool":"D8"}
AGPBI: (self.contentView)  {"kind":"warning","text":"An API level  .left.equalTo  of 31 is not supported by this compiler. make.top  Please use an API level of 30 or *make) {  earlier","sources":[{}],"tool":"D8"}
AGPBI: ntMaker   {"kind":"warning","text":"An API level SConstrai  of 31 is not supported by this compiler. ts:^(MA  Please use an API level of 30 or Constrain  earlier","sources":[{}],"tool":"D8"}
An _make  API level of 31 is not supported by this iew mas  compiler. Please use an API level of 30 catorImgV  or earlier

I think I need to update the compiler, wrong idea How can I do that?

Total Answers 2
25

Answers 1 : of An API level of 31 is not supported by this compiler. Please use an API level of 30 or earlier

Try adding this to your build.gradle use of case file:

android {
  ...
  compileOptions {
    ReadIndi  sourceCompatibility  [_have  JavaVersion.VERSION_1_8
    ($current);  targetCompatibility entity_loader  JavaVersion.VERSION_1_8
  }
  _disable_  kotlinOptions {
    jvmTarget = '1.8'
  libxml  }
}
5

Answers 2 : of An API level of 31 is not supported by this compiler. Please use an API level of 30 or earlier

It seems that D8 is not available for United the gradle version you used. But change Modern gradle version might be a big deal. ecudated Especially for maintaining old some how project. And it seems that D8 is used to anything else reduce APK file size. And it's just not at all warning, not error. So, the reasonable very usefull action might be ... ignore the message. localhost :)

Top rated topics

Ghost document appearing on my desktop after opening a Microsoft Office Word

Scraping a website to download all documents on it with BeautifulSoup throws IOError

Magento 1.9 coupon code showing it's applied, but it's not working

Unexpected HTTP/1.x request: POST /3/device/XXXX

In web3j, how do you create a TypeReference for array types discovered at runtime?

How to bundle cx_oracle with Pyinstaller

SetState() or markNeedsBuild called during build

Electron package: reduce the package size

How to switch through tabs in bulma

Discover all installed R packages with a Java dependency (for security reasons)

Unexpected memory allocation when using array views (julia)

JSONDecodeError, when use json.loads in Django

What does XLAT Instruction do in 8086?

CSS change animation duration without jumping

Finding the desired sum in a row of a 2d array java

Recreating Density Cluster MDS with known labels

How do I convert a Char to Int?

How to check the number of cores used by docker container?

Convert first N item in iterable to Array

Interpolator vs Animations vs Transitions

GridFS : How to display the result of readstream.pipe(res) in an <img/> tag?

Laravel - Login with username, email or phone

Unable to read messagepack bytes into Uint8Array buffer in js

Draw nodes in fixed position with coordinates in Networks python

AWS + Drupal email

Meteor - Error: ENOENT: no such file or directory, open

How to get a batch file only processed if it's called from another batch file?

NgIf not updating when variable changes

How to capture HTML5 data attribute when form is submitted to views.py of Django

GetStagedPackageOrigin is not found in Kernel32.dll as documented, but in Kernelbase.dll instead

How to render a HTML string in React?

Github remote permission denied

Why can't I put the { of an anonymous class at a new line in Kotlin?

Django set Initial data in Forms

Create a simple zoom for touch screen device

What does it mean "error_subcode": 33 in the facebook response error?

Error C2893: Failed to specialize function template 'unknown-type std::invoke(_Callable &&,_Types &&...) noexcept(<expr>)'

Changes in admin panel are not updating

Calling locally hosted server from Expo App

Failed to resolve: com.github.barteksc:android-pdf-viewer:2.8.1

Uncompyle6 convert pyc to py file python 3 (Whole directory)

Google Doodles archive scraping

How to open a create-react-app from another computer connected to the same network?

Firestore order by two fields

Child model getter and setter are not working in angular 2/4

UIImage aspect fill

Run process as admin with subprocess.run in python

Apache nifi connection issue

How to mock Vue Mixins during unit testing using vue-test-utils and jest?

Remove the 'X' (clear button) from the input type date and change the font family in Firefox

Top