Android build is failing when updates to compileSDKVersion and targetSDKVersion - android

I have faced a problem in making an android build was working perfectly since the last 5 months but my Bitrise workflow is failing when I update compileSDKVersion and targetSDKVersion can you please help me are how to solve this issue
Previous
compileSdkVersion : 30
targetSdkVersion : 30
Work perfectly
Currently
compileSdkVersion : 31
targetSdkVersion : 31
Can’t work perfectly
Screen-short
[1]: https://i.stack.imgur.com/80ewD.png
Note:- My project is built in React Native framework, On my local system this project works perfectly and successfully created android build
System Specification:-
OS:- Monterey
RAM:- 16 GB
JDK Version:- 11.0.15
React native version:- 0.65.1

Updating just the SDK versions like that will cause problems because other pieces of React Native might be tied to it. You have to upgrade React Native to the latest version (or whichever version that supports SDK 31).
Undo your changes and upgrade using React Native CLI's upgrade command.
npx react-native upgrade
You can read more about it here.

Related

Android Studio - Android Gradle Plugin That Supports 33 (?)

It occured three days ago and couldn't find a solution yet. When I tried to run an app on my phone I receive this eror : " Recommended action: Update this project's version of the Android Gradle plugin to one that supports 33, then update this project to use compileSdkVerion of at least 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)."
I literally tried every kind of update but still couldn't figure it out.
I updated Git VSC plugin , compileSDKversion ,Android Gradle , crated a new project , restarted Android Studio... None of them worked out.

how to upgrade android sdk version by command line

i am new to Android development and i want to upgrade my android sdk version from 32.1.0-rc1 to 33.0.0-rc2.
And i have another question what is the difference between compileSdkVersion and targetSdkVersion on the file build.gradle on flutter ?
For update sdk by command LINE, see this gist:
https://gist.github.com/srayhunter/4bce340b62109b5bae43
sdkmanager "build-tools;30.0.2" "platforms;
About the difference ...
The compileSdkVersion is the version of the API the app is compiled against. This means you can use Android API features included in that version of the API.
And the targetSdkVersion indicate that you have tested your app on the version you specify.

unable to upgrade old react native project with API level 28 to API level 31

I have a 2 year old react native project created based on version 61.5 having API level version 28. Now I am trying to upgrade it. I have upgraded the gradle version to latest, react native is also upgraded, solved the issues that came in. My target version change are as follow
buildToolsVersion = "30.0.3"
minSdkVersion = 21
compileSdkVersion = 31
targetSdkVersion = 31
supportLibVersion = "31.0.0"
when I run react-native run-android app builds successfully, installs it in emulator, but I am getting the error as shown in the screenshot, because it doesn't suggest where the error is to be able to figure out the root cause. And if I run "yarn start" the app loads and works properly.
Does anyone have experienced this kind of issue? Can any one please suggest how to get more insight into the error message to find which file is causing it.

Cordova versionCode appends 8 after build

I am building for Android using Cordova with Ionic. I have set the versionCode in the widget tag inside the config.xml file to 10. But after building the app I am getting the version code as 108.
The version of Cordova that I have is 6.1.1.
How can I build an app where the versionCode is unchanged?
This still seems to be an unresolved issue in Cordova since version 5.0. Check out this issue link for more info on the same.
Also I suggest you to look at the following SO post for possible resolution of the issue.

Android version downgrade

Please I am trying to build a small android app with ionic but I downloaded android SDK 5.1.1 .
I wish to deploy to a device that has android version 2.3.3 but it won't even build .
It keeps telling me that the target app is android-22. I want it to build for a lower version like android-8.
Please any help will really be appreciated.
I only want it to be able to build for a lower version
I tried to edit the version in the androidManifest.xml files on my project but still I get errors
->First of all, let`s make sure you have downloaded the plateform for Android 2.2 using Android SDK Manager.
->Set android:minSdkVersion to 8 in androidManifest.xml
->Verify the BuidTarget attribute, since it specifies the development tool of which api to provide you.
->Your problem seems to be the absence of API8 in your SDK.
you might need to change your minSdk in build.gradle
in the app build.gradle file set the min sdk version as 8.
defaultConfig {
applicationId "com.etrade.mobilepro.activity"
minSdkVersion 8
versionCode 87
versionName "4.5"
}
Since the app is not building I guess you don't have that particular sdk.I would suggest downloading the sdk through sdk manager.

Categories

Resources