RenderScript does not build ScriptC file on android studio - android

I am trying to integrate the answer which uses render script in the following link to my project. But rotator.rs does not generate the ScriptC_rotator file. How can I integrate this?
Android: rotate image without loading it to memory
My Gradle (I can import android.support.v8.renderscript.RenderScript and
android.support.v8.renderscript.Allocation fine)
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.XXXX"
minSdkVersion 12
targetSdkVersion 23
renderscriptTargetApi 22
renderscriptSupportModeEnabled true
renderscriptNdkModeEnabled true
}
buildTypes {
release {
minifyEnabled false
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:support-v4:+'
compile 'com.google.android.gms:play-services:+'
compile 'com.android.support:appcompat-v7:+'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
}

renderscriptNdkModeEnabled should be false. If you have it set to true, you will get ScriptC_rotator.cpp instead.

Related

How to solve "gradle failed resolve"?

Can't compile it and can't see in my library.
Error
gradle failed resolve `com.theartofdev.edmodo:android-image-cropper:+” Compilation fails.
build.gradle code
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.example.backuppc.breathanalyzer"
minSdkVersion 23
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
The dependencies
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.android.support:recyclerview-v7:23.4.0'
compile 'com.android.support:cardview-v7:23.4.0'
compile 'com.theartofdev.edmodo:android-image-cropper:+'
}
Please replace the
compile 'com.theartofdev.edmodo:android-image-cropper:+'
with the latest version
compile 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
Please make sure the dependency is of latest version. You can get the latest version here:
https://bintray.com/package/files/arthurhub/maven/Android-Image-Cropper?order=asc&sort=name&basePath=com%2Ftheartofdev%2Fedmodo%2Fandroid-image-cropper&tab=files
Hope this helps..

Gradle 'AppName' project refresh failed Cause: hostname in certificate didn't match

Gradle 'AppName' project refresh failed
Error:Cause: hostname in certificate didn't match: <jcenter.bintray.com> != <*.services-exchange.com> OR <*.services-exchange.com> OR <services-exchange.com>
1.I am searching for a long time on net. But no use. Please help or try to give some ideas how to achieve this.
2.First ,I want change the version of the package(the 'appacompat-v7' and 'design'),then I change it to 25.0.3,the IDE give me a tip,next I change the targetSdkVersion to 25 and compileSdkVersion. The gradle didn't work.
3.
dependencies {
classpath 'com.android.tools.build:gradle:2.10'
4.
android {
compileSdkVersion 23
buildToolsVersion '23.0.3'
defaultConfig {
applicationId "AppName"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support.appcompat-v7:appacompat-v7:23.0.3'
compile 'com.android.support.design:design:23.0.3'
compile 'com.squareup.oktppp3:okhttp:3.10.0'
complie 'com.google.code.gson:gson:2.7'
complie 'com.android.recycleview-v7:23.0.3'
complie 'com.github.bumptech.glide:3.7.0'
complie 'com.wdullaer:masterladateimepicker:2.5.0'
}
How can I repair it?
You have a typo error. You should use this and change compile to implementation if you're using Android 3.0 and higher
compileSdkVersion 23
targetSdkVersion 23
Your applicationId should reflect your package name. Confirm this from your manifest.
Use 23.1.1 for dependencies
implementation 'com.android.support:appcompat-v7:23.1.1'
And this
classpath 'com.android.tools.build:gradle:3.1.3'

Failed to resolve: com.android.support:appcompat-v7:22.0.0:

Error:
Failed to resolve: com.android.support:appcompat-v7:22.0.0:
How do I solve this error?
Config:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.ummat.qmduain"
minSdkVersion 11
targetSdkVersion 23
versionCode 1
versionName '1.0'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile files('libs/hvjavacal.jar')
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.google.android.gms:play-services:7.8.0'
compile 'com.google.android.gms:play-services-ads:7.8.0'
compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
}
Screenshot:
You are trying to compile version 22, but your compile SDK version is 23.
Solution:
'com.android.support:appcompat-v7:23.4.0'
You have a mismatch in your compile sdkVersion and support library version. You should use 23.0.0 or a newer version in 23.
On a side note, you are on a very old library versions. I would recommend bump up to 27 unless you have some other requirement.

How to change target sdk and compile sdk into 25

I recently updated my android studio in 2.3 . Now I want to change my target sdk and compile sdk into api 25 but which dependency should I compile ? now my target sdk and compile sdk is api 23 and I am compiling the dependency 23.4.0
Thankz in advance
my gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '25.0.0'
defaultConfig {
applicationId "com.example.application"
minSdkVersion 14
targetSdkVersion 25
versionCode 60
versionName "2.2.6.25"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
checkReleaseBuilds false
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile('com.android.support:appcompat-v7:23.4.0',
'com.android.support:design:23.4.0',
'com.android.support:cardview-v7:23.4.0',
'com.android.support:recyclerview-v7:23.4.0',
'com.android.support:support-annotations:23.4.0',
'com.android.support:multidex:1.0.1')
compile 'com.itextpdf:itextg:5.5.9'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.google.android.gms:play-services:6.1.71'
testCompile 'junit:junit:4.12'
}
Call :25.1.0 instead of :23.4.0
You should use
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:recyclerview-v7:25.1.0'
compile 'com.android.support:cardview-v7:25.1.0'
compile 'com.android.support:design:25.1.0'
compile 'com.android.support:support-annotations:25.1.0'
compile 'com.google.android.gms:play-services:10.0.1'
compile 'com.android.support:support-v4:25.1.0'
and
compileSdkVersion 25
buildToolsVersion '25.0.1'
Go to your project Structure
Then click on app module
Now click on Flavors
There you Edit your Target sdk version and Min sdk version
please check screenshot
Try this
android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
defaultConfig {
...
targetSdkVersion 25
}
}

App getting crashed in version 5.0

The problem I am facing is that my android application works well on devices 4.4.2 and below, but crashes on devices having Lollipop(5.0) and its corresponding higher versions.I know that its somehow related to the build tools in my gradle file,but still not able to figure out the problem.Could someone please help me out with this.
This is my gradle file,
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '23.0.1'
defaultConfig {
applicationId "com.vs.vertosys"
minSdkVersion 14
targetSdkVersion 23
multiDexEnabled true
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
jcenter() {}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.android.support:multidex:1.0.1'
// compile 'com.android.support:appcompat-v4:23.1.1'
compile 'com.google.android.gms:play-services-gcm:8.4.0'
compile 'com.google.android.gms:play-services-location:+'
compile 'com.pushwoosh:pushwoosh:+'
}

Categories

Resources