please explain me. 'Plugin with id not found', 'Android NDK undefined modules' - android

I downloaded 'Tess-two' library.
After project was ndk-builded&ant release in cmd, I import library in my project.
here was one error.
'Plugin with id 'com.github.dcendents.android-maven' not found.'
I had solved, just add 2 line in my app module gradle.
-like this
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
The error was completely solved, however another error appeared.
C:/android-ndk-r14/build//../build/core/build-binary.mk:687: Android NDK: Module
pngt depends on undefined modules: z
C:/android-ndk-r14/build//../build/core/build-binary.mk:700: *** Android NDK: Ab
orting (set APP_ALLOW_MISSING_DEPS=true to allow missing dependencies).Stop.
At this time, I just added one line in tess-two\jni\Application.mk.
APP_ALLOW_MISSING_DEPS=true
Now, my project can build very well.
But I can't understand what I did.
Somebody please explain to me. What mean that error and how that codes could solve that error.

Module builds will now fail if they have any missing dependencies.
https://github.com/android-ndk/ndk/wiki/Changelog-r14-beta1

File > Project Structure
As I wrote above, since it is the specification of NDK r14, we could do it after downloading NDK r13b.
It will be r14 in the near future, but you can also download old revisions, so please check them yourself.

Related

Android - org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:

I am building an android application in which I tried to integrate Firebase Performance Monitoring. In the documentation it is mentioned that I need to add the following line in the project level build.gradle
classpath 'com.google.firebase:perf-plugin:1.3.4'
I have misplaced this dependency in app level build.grade by replacing the classpath with implementation. I have realized the mistake I made and then tried to move the dependency to project level build.gradle file but I am getting the following exception.
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
I have even tried removing .gradle folder from the project location and restarted the Android studio but still facing the same issue.
Please help me find the solution.

what is the important of build.gradle and R.java file in Android Studio?

"Gradle: Execution failed for task ':Results:processDebugResources'
Running /home/mydata/Desktop/android-studio/sdk/build-tools/android-4.2.2/aapt failed.
R.java file is empty, I don't know wheather the above error is the reason or not. My R.java is located in src/main/gen/com/example/results
Try the following:
-Migrate project to androidx
-Raise the minSDK and targetSDK
-update all dependencies to the newest version
This issue usually comes from an issue with a dependency in your build gradle. Either one is not compatible or up to date with the rest of the dependencies or the version you are using is bugged.

Getting The SourceSet 'instrumentTest' is not recognized by the Android Gradle Plugin when i merged branch

I am getting below error only when I try to merge my branch with the main branch in my project.
The SourceSet 'instrumentTest' is not recognized by the Android Gradle Plugin.
And when I reset my branch to the last commit, it works.
This was happening in Android Studio Version 3.1.2 and it's still there in current version 3.2 also.
This issue has already taken a lot of my time.
I tried to fix it by replacing instrumentTest with androidTest answered here but it's not working for me.
This error leads to the above Unable to resolve dependency errors
Thanks in advance.
Somehow, I found the answer to this problem.
After reading the errors carefully, I came to know that the problem is there in my lib module.
And the error was not actually the one mentioned in Title.
Then I did below changes in the code.
I tried upgrating gradle version from 3.2.0 to 3.3.0-alpha13 and
gradle distribution version from 4.6 to 4.10.1 in gradle-wrapper.properties.
Earlier my lib/build.gradle containing only release buildType.
So I added same buildTypes which were in app/build.gradle.
Now my lib/build.gradle and app/build.gradle have same buildTypes
lib/build.gradle
app/build.gradle
And after syncing & building the project, I got rid of these errors(errors from image; Unable to resolve dependency).
Hope this will help someone.
Thanks.

Crystax usage with IntelliJ IDEA

I have tried the Crystax sample on IDEA, and I have compiled it successfully, got it to run on my phone.
However, when I try to modify the project, IDEA throws an error about Gradle version:
Error:The project is using an incompatible version of the Android Gradle "experimental" plugin.
Please update your project to use version 0.9.0.
Then I updated it and met new problems:
Gradle version 3.3 is required. Current version is 4.1.
Please fix the project's Gradle settings.
I choose to Fix Gradle wrapper and re-import project
Then the next error appears:
Cannot set readonly property: proguardFiles for class: com.android.build.gradle.managed.BuildType
Please, is there anyone who knows how to use Crystax on IDEA IDE?
I found an alternative way, which does not relies on AS to build.
Just set your system PATH to Crystax-ndk folder, set up your Application.mk and Android.mk, and run command:
ndk-build
then you will get the result lib or executable file, then, link it to your Android project.

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.

Categories

Resources