Android Studio 2.0 Preview 2 issue with Renderscript - android

I updated Android Studio to 2.0 Preview 2, then I got an error Renderscript support mode is not currently supported with renderscript target 21+
I'm using renderscriptTargetApi 23

Renderscript isn't currently supported with Target 21+ so simply change the target to API 20 and that should solve the error. So the renderscript related options in your default config section of your gradle file should like :
renderscriptTargetApi 20
renderscriptSupportModeEnabled true

The bug related to renderscriptTargetApi has been fixed in gradle-plugin 2.1.0 and Build-Tools 23.0.3.
Please try it out:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
}
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
...
}

#atabouraya,
This is bug in build tools. Please check your build tools version and if is lower than 23.0.3, update them.
More info here:
http://developer.android.com/intl/es/tools/revisions/build-tools.html
in Build Tools, Revision 23.0.3 (March 2016)

#atabouraya,
There need to be change in build.gradle of your app
as suggested from android developer site.
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
minSdkVersion 8
targetSdkVersion 19
renderscriptTargetApi 18
renderscriptSupportModeEnabled true
}
}

Just change renderscriptTargetApi 23 to renderscriptTargetApi 20, and make sure your minSdkVersion less than 21.

Related

How to change api level 29 to 30 in expo react native App

This Message was appear when i upload my app bundle to play store
Your app currently targets API level 29 and must target at least API level 30 to ensure it is built on the latest APIs optimized for security and performance. Change your app's target API level to at least 30.
If you have a managed workflow expo app.
To make expo target new Api level 30, you need to upgrade your app to Expo SDK 41 or higher.
Do the following ;
Upgrade your expo cli to 41 or higher - npm i -g expo-cli expo-cli#4.4.1
Run expo upgrade on your project
Create a new build of your app for Google Paystore - expo build:android
This will now target api 30
Open build.gradle under android/app/
find the android { } block
Change the following version to the below:
compileSdkVersion 27
buildToolsVersion "27.0.3"
minSdkVersion 16
targetSdkVersion 27
In case your current android/app/build.gradle has lines which look like :
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
You will have to edit the android/build.gradle to include :
buildscript {
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 21
compileSdkVersion = 28
targetSdkVersion = 28
supportLibVersion = "28.0.0"
}
...
}
In NON-EXPO projects edit the andoid/build.gradle file as follows:
buildscript {
ext {
buildToolsVersion = "30.0.2"
minSdkVersion = 21
compileSdkVersion = 30
targetSdkVersion = 30
ndkVersion = "20.1.5948944"
...
}
...
}
As per the new Google Play Policy starting from August 21 all new apps must target androidSdk version 30 and the same applies to app updates from November 21
You can read in detail here
EDIT: See #Syafiqur__ 's answer below for a detailed method on how to do so. Maybe OP doesn't clearly ask the methodology and that's why only the reason why that message came was told
EDIT2: See #AyoDavid 's answer for a more React-Native way to do so

Android Studio ERROR: Manifest merger failed : uses-sdk:minSdkVersion

ERROR: Manifest merger failed : uses-sdk:minSdkVersion 15 cannot be smaller than version 16 declared in library [com.google.firebase:firebase-iid:19.0.0] C:\Users\User.gradle\caches\transforms-2\files-2.1\856a947c1a9c6ebc4d2fc0c2fb4dbece\firebase-iid-19.0.0\AndroidManifest.xml as the library might be using APIs not available in 15
Suggestion: use a compatible library with a minSdk of at most 15,
or increase this project's minSdk version to at least 16,
or use tools:overrideLibrary="com.google.firebase.iid" to force usage (may lead to runtime failures)
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.google.gms:google-services:4.2.0' // Google Services plugin
}
dependencies {
// Add the Firebase SDK for Google Analytics
implementation 'com.google.firebase:firebase-analytics:17.1.0'
}
minSdkVersion for firebase library is changed to API level 16 to align with the Google Play services distribution policy.
so you have to change your gradle file like
android {
...
defaultConfig {
minSdkVersion 16
..
}
}
Error says minSdkVersion 15 cannot be smaller than version 16
In that case:
Just change the minSdkVersion in gradle file to 16
The minimum SDK level required to use the most recently versions of Firebase libraries is 16. There is no workaround.
In your build.gradle file change the value with:
android {
...
defaultConfig {
minSdkVersion 16 //or higher
..
}
}
in your build.gradle file, please change the version higher than "minSdkVersion 15".
android {
compileSdkVersion 28
defaultConfig {
applicationId 'com.Demo'
minSdkVersion 21
targetSdkVersion 28
versionCode 10
versionName "1.6"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
and Add gradle :- implementation 'com.android.support:multidex:1.0.3'
Please go to build.gradle(Module.app) and update "minSdkVersion" to 16 or more as below:
defaultConfig {
.............
minSdkVersion 21
............
}
or upper then click on "Sync".
I encountered the same problem and the solution worked for me as follows:
You have to go to the build.gradle file .. app
and then to the defaultConfig{ . section
and replace this text
minSdkVersion flutter.targetSdkVersion
with this code
minSdkVersion 19
then click on "Sync".
Of course, this solution will work with those who work on Platform Flutter , Visual studio code

Gradle asks for nonexistent support library version

Recently I've been getting this problem.
As far as I know, there is no 26.X.X versions of these support libraries, what does Gradle wants from me?
After reviewing a previous question, you may want to be sure that your compileSdkVersion matches across the board, if you want to build in 25 but you are in 23.
This support library should not use a different version Error in build.gradle
You can confirm versions by >> Create new project in Android studio >> Press Ctrl+Shift+Alt+S >> Proceed to 'Project' section >> You can see actual gradle version and android pluging version. Copy that to your project.
The problem lies in your Compile version in build.gradle file.
It seems, your compile version is 26.
Please change your compile version to 25 and sync gradle.
compileSdkVersion 25
buildToolsVersion "25.0.3"
Please set your Compile Version to 25
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.example.user.xxxxx"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
}

Gradle Sync Fail

I get this error when trying to build my app:
Could not find com.android.support.constraint:constraint-layout:1.0.0-alpha1
Required by:
MyApp:app:unspecified
Gradle version:
classpath 'com.android.tools.build:gradle:2.3.0-alpha2'
Android studio version;
android {
compileSdkVersion 23
buildToolsVersion '25.0.0'
defaultConfig {
applicationId "MyApp"
minSdkVersion 22
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
}
I tried going to SDK TOOLS and enabling the constraint solver, but I did not help. This happened just today, and have not have had this issue earlier. Any ideas?
Check if you have installed ConstraintLayout. Open SDK Manager and than in SDK Tools tab you can check what version of ConstarintLayout is installed.

Android compile project with target="android-19" failed

Masters,
Recently I am trying to build android project with gradle, and since there one API(#JavascriptInterface annotation) I need to use is only up to api level 17, so I changed my targetAPILevel to 19 in project properties. And it works well when I build the project from Eclipse(Right click on project and Run Android Application).
But when I tried to build the project by gradlew in terminal, it seems it never use target level 19 to build the project. Here is part of the build.gradle file as follow:
android {
// target = 'android-19'
compileSdkVersion 19
buildToolsVersion '19.0.1'
}
Can anyone help me what I did wrong in here, please? Thank you very much.
TargetSdkVersion and compileSdkVersion are different parameters.
In eclipse, you set the target in your Manifest, and set the api used to compile with right click -> properties -> Android Manu.
In your build.gradle you should use something like this:
android {
compileSdkVersion 19
buildToolsVersion "19.0.3"
defaultConfig {
minSdkVersion 14
targetSdkVersion 19
versionCode 1
versionName "1.0"
}
}

Categories

Resources