Sinch tutorial gradle build errors - android

Im trying to get sinch going, and I am following their tutorial form here.
https://www.sinch.com/tutorials/android-messaging-tutorial-using-sinch-and-parse/
step one is download the skelton and do the gradle build, however first error was unsporrted version of gradle. android studio fixed it automatically and re-imported. and then i get this error:
Error:(15, 0) Gradle DSL method not found: 'runProguard()'
Possible causes:The project 'messenger' may be using a version of Gradle that does not contain the method.
Open Gradle wrapper fileThe build file may be missing a Gradle plugin.
Apply Gradle plugin
I'm new to android programming and android studio, so I'm kinda lost. How can i get this built and continue with the tutorial?

To comply with the newer versions of Gradle, change 'runProguard' to 'minifyEnabled'

in my case, i am using sinch 3.11.1.
it is aar file.
so you need to import aar file.
after that you can use sinch on your project.
to import aar file you can follow this video (it is not mine):
https://www.youtube.com/watch?v=J-GbMTa1fX0
hope it helps.

Related

Android OCR: Importing to Android Studio

I am trying to import an android ocr project from Eclipse(juno) to Android Studio. However faces the following error.
Error:Execution failed for task ':eyestwo:compileReleaseNdk'.
Error: NDK integration is deprecated in the current plugin. Consider trying the new experimental plugin. For details, see http://tools.android.com/tech-docs/new-build-system/gradle-experimental. Set "android.useDeprecatedNdk=true" in gradle.properties to continue using the current NDK integration.
I have tried searching for solution for this problem and found several solutions from this links:
After updating Android Studio to version 1.3.0 I am getting "NDK integration is deprecated in the current plugin" Error
NDK Integration in Android Studio Error
However, both methods did not work for me as the 2nd method leads to the error:
"Gradle DSL method not found:'sourceSets()'"
The 1st method leads to the error as shown below when I try to run the application:
The source code I used is from here: https://github.com/TheWall89/AndrOCR
Follow this guide and u'll get the correct result... I have done this before..
Tess Two guide for android studio
My project source code

Could not create an instance of Tooling API implementation using the specified Gradle installation

I just downloaded and installed the latest version of android studio (v 1.4). After creating a new project, I see this error about the gradle refresh failure:
Error: Could not create an instance of Tooling API implementation using the specified Gradle installation '/Applications/Android Studio.app/Contents/gradle/gradle-2.4'.
I've tried so many different things that I have found online and no fix. When I open the layout window of the project it says "Gradle project sync failed..."
I am not sure what the error means at all and also do not know how to use any other different version of it.
I had this problem, fix is don't use gradle 2.4 I deleted gradle/gradle 2.4 folder and in gradle/wrapper/ gradle-wrapper-properties in build directory change 'distributionUrl' to another gradle distribution.
Deleting everything in /Library/Java/Extensions/ fixed this for me.
Issue with more info: https://issues.gradle.org/browse/GRADLE-1451
Add lines at the end of eclipse.ini
--illegal-access=warn
--add-opens=java.base/java.lang=ALL-UNNAMED
--add-opens=java.base/java.io=ALL-UNNAMED
--add-opens=java.base/java.util=ALL-UNNAMED
source

Integrating SQLCIPHER in Android Studio Project

I tried integrating SQLCipher in my Android Application, using this link and also some stack-overflow links(but they are out-dated and differs from official document).
All the steps are correctly followed, and there is no error in the coding part. But at last, when I build the project, the error message I get is :
Error:(11, 0) Gradle DSL method not found: 'defaultConfig()'
Possible causes:The project 'android-database-sqlcipher-master1' may be using a version of Gradle that does not contain the method.
Open Gradle wrapper fileThe build file may be missing a Gradle plugin.
Apply Gradle plugin
Can anyone please help me to get rid of this error.
add this to your build.gradle of your app and it should work out of the box:
dependencies {
compile 'net.zetetic:android-database-sqlcipher:3.5.2#aar'
...
}
In your code, you should load the 'native libraries' as this 'aar' file contains a few of them.
SQLiteDatabase.loadLibs(context);
NOTE that you should use the net.sqlcipher.database.SQLiteDatabase instead of android.database.sqlite.SQLiteDatabase, just like a couple of other SQLite classes.

Import a project to Android studio faced problems

I want reading an open source project so I select k9mail for start. The recommendation was run and reading this code in Android Studio. I import k9mail project to AS 1.2.1.1 version. I download gradle 2.4 version and added this in environment variable. When I want to run this application, but I receive some errors that I describe below:
1) When I click Run (Alt+Shift+F10), select Android Application, select my module (there is k9mail) and select USB Device, then I see a warning:
No JDK specified for module 'k-9-master'.
2) When I click on Run (Shift+F10), I faced this error in messages tab:
Gradle DSL method not found: 'android()'
Possible causes:
A)The project 'k-9-master' may be using a version of Gradle that does not contain the method.Open Gradle wrapper file
B)The build file may be missing a Gradle plugin. Apply Gradle plugin
When I updated gradle to 2.4, I changed classpath 'com.android.tools.build:gradle:1.2.3' to 'classpath 'com.android.tools.build:gradle:2.4'' from build.gradle of k9mail, but my problems were not solved.
I googled but I can't find solutions for my problems.
No jdk specified for the module.
For that you have to specify the jdk path through Project Structure.
You may also verify by looking at local.properties
For gradle related issues you just kindly update your gradle build and SDKs to latest versions.
This will minimize your gradle issues.

Error:(31, 0) Gradle DSL method not found: 'jniDebugBuild()'

Today I have updated my Android Studio and I keep getting this error no matter what I do. I imported a project from github everything was running smoothly until I updated now I keep getting this error:
Error:(31, 0) Gradle DSL method not found: 'jniDebugBuild()'
Possible causes:The project 'my_application' may be using a version of Gradle that does not contain the method.
Open Gradle wrapper fileThe build file may be missing a Gradle plugin.
Apply Gradle plugin
Can anyone help out?
The name of this property has changed in v0.14.0 and later of the Android Gradle plugin, so build files created for earlier versions need to be updated. Look through all the build.gradle files in the project, and when you see jniDebugBuild, change it to jniDebuggable.
You may run into other things that need to be renamed; the list of remappings is in the release notes at http://tools.android.com/tech-docs/new-build-system.

Categories

Resources