App Update Android Studio Version name and Version code - android-studio

For App Update , which i need to change version code or version name in android studio
minSdkVersion 21
targetSdkVersion 30
versionCode 11
versionName "11"

There are some tips from this resources:
https://support.google.com/googleplay/android-developer/answer/9859350?hl=en
https://developer.android.com/studio/publish/versioning
I hope these will help you:
When you're ready to make changes to your app, this article describes what you need to do to make sure that existing users receive your update.
Prepare your updates
The package name of the updated Android App Bundle must be the same
as the current version.
The version code must be greater than the current version. Go to the
Android Developers site to learn more about versioning your app.
The updated app bundle must be signed with the same signature as the
current version.

Related

No documentation in Android Studio 4.0.1 (Linux Mint)

I don't get any description. I've reinstalled Android Studio, deleted whole android profile and cache but still it did't help.
Edit1 - Note: When new API's are released, the documentation is not always released with it. You need to check their update log to determine that.
Install the Sources of the API you are using.
The documentation will show up afterwards.
Steps:
Tools -> SDK Manager
Check "Show Package Details"
Check the required API Source
Wait for indexing to be finished.
When I faced this issue it was because the compileSdkVersion set in app build.gradle was only installed partially according to the SDK manager.
Installing the SDK for the compileSdkVersion fully fixed the documentation issue on Mac OS AS 4.0.1. This is accomplished by simply checking the checkbox.
To illustrate, on this image the documentation would work with compileSdkVersion set to 26 or 29, but not when set to 28 or 30.
Faced the same issue. Clearing cache doesn't seem to the trick.
The thing here is - Sources for Android 30 is not yet available in SDK Manager. So we need to use android 29 at least for development environment to see the documentation. Go through the following steps :
Download Sources for Android 29
Update the following properties in app/build.gradle file :
compileSdkVersion 29
buildToolsVersion "29.0.2"
targetSdkVersion 29

Unable to migrate Flutter project to AndroidX

I have a Flutter project in Android Studio. I am planning to migrate to AndroidX. Whenever I do Refactor -> Migrate to AndroidX, Android Studio shows error message:
You need to have compileSdk set to at least 28 in your module build.gradle to migrate to AndroidX.
However I have already set the compileSdkVersion 28 in my app/gradle.build file.
Is there anything else I need to do?
I was able to resolve my issue:
Open the Flutter project into Android Studio
Right click on the android directory, click on Flutter -> Open Android module in Android Studio. It asked me to upgrade my gradle plugin.
Then I installed Google Play Services. Tools -> SDK Manager -> SDK Tools and check the Google Play Services.
After the Google Play Services Installed, I did Refactor -> Migrate to AndroidX.
It started working.
Note: Do the refactor from the project window you opened in the step 2.
Here is how I got rid of "compileSdkVersion 28" error. But before I solved it this way, I upgraded Android Studio IDE from 3.4.1 -> 3.5.1. I am not sure if this was really needed. So whatever version of IDE you have, see if you can use following steps to solve it.
Go to "Project Structure" - (2nd icon on left of AVD Manager icon on top right corner of IDE)
On "Project Structure" dialog under left navigation click on Project Settings->Modules
After selecting Modules, on the right pane you should see 3 tabs Sources, Paths, Dependencies
Click on Dependencies, if you are getting compileSdkVersion 28 error the SDK version under Dependencies is pointing to version lower than 28 -> Select 28 or higher
5. Click OK
Now Refactor->Migrate to AndroidX worked for me
In gradle.build (app) add this
compileSdkVersion 28
defaultConfig {
......
minSdkVersion 21
targetSdkVersion 28
......
}
And there are some implementations required to use androidx :-
implementation 'androidx.appcompat:appcompat:1.1.0-alpha01'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
And add these given two lines(below) to gradle.properties:-
android.useAndroidX=true
android.enableJetifier=true
I'm having exact same problem. Been trying to migrate since all the new firebase stuff is forcing it, but the current guides to upgrade are sparse. First I was trying on a backup of my project with a lot of addons and kept getting that error, then I created a brand new flutter project with all the latest (dev channel), followed every step, checked every detail, read every forum, but still getting "You need to have compileSdk set to at least 28 in your module build.gradle to migrate to AndroidX."...
Matched the steps from https://androidxhackathon.blogspot.com/2018/05/refactor-to-android-x.html too and can't get it to refactor right.
Even went to File>ProjectStructure>Project SDK and set to Android API 28 Platform.
Anyone know what we might be missing? Did you have any luck Sam?
Click on Invalidate cache/Restart from file option worked for me
Try replacing the default in dependencies {...} in app/build.gradle with this:
dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
}
The replacement is similar to what is posted in the "Not recommended..." section from this link: https://flutter.dev/docs/development/packages-and-plugins/androidx-compatibility
If you can explain why this works, please add a comment. Thank you!
Go to "Project structure" in the Files menu. Clear out every issue you see there, like
set the android sdk, fix the problems specified
A simple solution.
follow the steps.
Create a new app --> (tick androidX in the window) --> finish
Add some lines in the android --> app --> build.gradle as follow,
update the defaultConfig
minSdkVersion 19
targetSdkVersion 28
multiDexEnabled true
Go to Refractor --> migrateToAndroidx
Do Flutter clean
Restart
Run
hope it works now ...

To much errors on Android Studio

I'm starting to program in Java, my goal is to program apps for android.
But Android Studio is giving me such a hard time. I already have some experience with C# and I've programm before with Visual and Unity and never encounter so many errors, theres always something with AS. I'm on Win 7 with Android Studio 3.1.4. Started giving error with adb.exe missing, gradle sync error and then haxm, but i was able to resolve those, but now is giving me error with Render problem failed to find style and Couldn't resolve resource, try the solution of change compileSdkVersion 27 targetSdkVersion 27, but didn't work. I haven't done anything, just start the project and is giving that, I let you with the screenshot, Thanks. This how the error appears
I just resolve it, so leaving this here if anyone encounters these errors. If you just install Android Studio I recommend you to go to file > settings > Android SDK, then tick the box show package details, install Android 8.1 SDK platform 27 and Sources for Android 27. Hit ok, after finish doubleclick on build.gradle module: app, change the values of to these:
compileSdkVersion 27
targetSdkVersion 27
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
The 28 version its giving problems, why? I don't know, but after reading a lot I was able to fix it this way. Especially if you just started with android studio and you installed for the first time.

Android Studio Failed to find target with hash string 'android-26'

I've installed latest Android Studio and
- I've created new project for sdk 25
- I have sdk 25 installed
I have this issues:
first of all, I don't see Tools > Android > AVD Manager. So I have no idea how can I set up additional AVD
second: I get this error in console
Error:Failed to find target with hash string 'android-26' in: C:\Android
Install missing platform(s) and sync project
Why is it complaining about version 26? I have project with api 25 set up?
This problem seem to emerge because AndroidStudio tries to target the last version of SDK it aware of. There few ways to solve it and #HarryFromMarydelDE Jan 7 at 20:18 presented nice solution in form of youtube video. I'll make this answer verbose and more detailed:
One way to deal it is to install sdk-26. You really may not have Android->AVD Manager menu items under Tools menu. You can find SDK Manager icon just under the Android Studio main menu, or open File->Settings (Ctrl+Alt+S) and go to Appearance&Behavior->System Settings->Android SDK
Other way is to find gradle.build file in YourAppName/app folder, find lines: compileSdkVersion 26 and targetSdkVersion 26 in it and change number into SDKs you already have.
But, if you'll change target sdk from 26 to 25, you may encounter more errors. Particularly, if you checked Back Compatibility box when you created your app in wizard. In this case you'll need to change 'com.android.support:appcompat-v7:26.1.0' string to use sdk 25 version of appcompat-v7:25.1.0 in the same file.
After this, you may encounter one more error:
Error:Execution failed for task ':app:preDebugAndroidTestBuild'.
Conflict with dependency 'com.android.support:support-annotations' in project ':app'. Resolved versions for app (25.1.0) and test app (27.1.1) differ. See https://d.android.com/r/tools/test-apk-dependency-conflicts.html for details.
To resolve it, edit app.iml in YourAppName/app folder: change 27.1.1 numbers to 25.1.0 and hopefully, Gradle will finally build your project.

Error:Module 'App name': platform 'android-15' not found

I am trying to start a project for google glass in android studio. I have all the SDK platforms required but still android studio keeps on giving me this error. Does anyone have any clue whats going on?
I just selected the update SDK option and then did rebuild. It said daemon started successfully
Sooooo...... remember to make changes in your build.gradle
change compileSdkVersion 15 to compileSdkVersion "Google Inc.:Glass Development Kit Sneak Peek:15"
I changed the compileSdkVersion to a lower one, synced, that failed, changed it back to the previous value, synced and it properly built. Very arbitrary, I know.
I had a similar problem. If you're on a mac than go into Android Studio/preferences/Appearance & Behavior/Android SDK and click on the SDK Tools tab. Update the Android SDK Platform Tools.
After you've updated this in the preference, go to Build/Clean Project. This takes a few seconds. When complete, go to Build/Rebuild Project.
The build should be successful this time.
If this doesn't work then go into file/ invalidate cashes restart
Hope this helps, Good luck.
Change targetSdkVersion and compileSdkVersion to the most current versions.

Resources