Android OCR: Importing to Android Studio - android

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

Related

Failed to build when using fragment testing library on AndroidGradlePlugin 3.5.0 and above for Dynamic Feature module

So, I was trying to use fragment testing library androidx.fragment:fragment-testing:1.2.4 in a dynamic feature module. When I used Android Gradle Plugin (AGP) version 3.6.3, it failed to build with an error
AAPT: error: resource style/FragmentScenarioEmptyFragmentActivityTheme (aka com.example.reminder.test:style/FragmentScenarioEmptyFragmentActivityTheme) not found.
And so I was curious and checkout the codelab github and try to upgrade the AGP on that project to 3.6.3 and it can build successfully. But the codelab does not use Dynamic Features.
So I tried to actually run a fragment test in my app module only (excluding the dynamic features module) and yes it can build successfully too.
But I still need to test my fragment in the dynamic features module, so I tried playing with the version one by one and then when I downgrade the AGP version to 3.4.1 it can build successfully.
And I found out that since AGP version 3.5.0 and above, it just failed to build with the same error above.
So,
AGP 3.5.0 and above:
- Building test on app module only -> works
- Building test on dynamic features -> failed to build
AGP 3.4.2 and below:
- Building test on app module only -> works
- Building test with dynamic features -> works
But I still want to use AGP 3.6.0 because I want to utilise viewBinding.
So does anyone know how to resolve the error above for fragment testing with dynamic features module?
Upgrading AGP to 4.0.0 and above should resolve the issue.

Error while integrating openCV 3.2.0 with android studio

I get this error while integrating openCV with android studio.
I am new to android and not able to understand why this error occurs.
Error:Execution failed for task ':app:compileDebugNdk'.
Error: Your project contains C++ files but it is not using a supported native build system.
Consider using CMake or ndk-build integration with the stable Android Gradle plugin:
https://developer.android.com/studio/projects/add-native-code.html
or use the experimental plugin:
https://developer.android.com/studio/build/experimental-plugin.html.
I suggest that you should try one of the NDK examples provided by Google, and become familiar with using the NDK before trying a large library like OpenCV on Android Studio. The answers here are quite detailed, and can be helpful.

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.

Sinch tutorial gradle build errors

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.

Android & java.util.concurrent.ConcurrentLinkedQueue

I want to use ConcurrentLinkedQueue in an android application, have written the code, but now I'm getting an error when the project builds:
Conversion to Dalvik format failed with error 2
I'm using Eclipse with the lastest version of the ADT plugin.
Any ideas how I can fix this problem?
You have a classpath problem. You shouldn't have to compile it. It's provided in Android API.

Categories

Resources