There is plenty of "chatter", but I did not find an answer for my project.
While performing the Gradle Sync in my project with Crashlytics, Gradle fails to sync. I have other projects that are just fine and when I 'diff' the build.gradle files and other Android Studio settings, they have the same values and settings related to Crashlytics.
A problem occurred configuring project ':app'.
> org.gradle.api.GradleException: Crashlytics could not determine stripped/unstripped native library directories for project ':app', variant Debug. These are required for generating symbol files when NDK build tasks cannot be automatically inferred. Please specify strippedNativeLibsDir and unstrippedNativeLibsDir in the firebaseCrashlytics extension.
I am not looking for someone to triage my configuration, instead I want to know where in my project files can I find the "firebaseCrashlytics extension" and its configuration and where are the stripped and unstripped files so I can supply a path? If you know the answer from documentation, please share the link.
Make sure your android/app/build.gradle has the following:
release {
// ...
firebaseCrashlytics {
nativeSymbolUploadEnabled true
strippedNativeLibsDir 'build/intermediates/stripped_native_libs/release/out/lib'
unstrippedNativeLibsDir 'build/intermediates/merged_native_libs/release/out/lib'
}
// ...
}
See https://github.com/invertase/react-native-firebase/issues/4253#issuecomment-797187492
In my case, I had a few projects cloned locally of the same repo. One of them was for a too old branch. Like 3-4 years back. For it, I have given a path to another NDK in the local.properties file.
ndk.dir=C\:\\NDK\\android-ndk-r13b\\android-ndk-r13b
It was causing my problem with the recent branches. After deleting it - it worked. So even if it is not the exact same case for you - it is most likely that you are building with the wrong SDК. Try updating in the SDK manager or maybe actually try explicitly saying what you need as I was doing above.
In my project-level build.gradle, Android Studio recommends updating the the firebase-crashlytics-gradle from 2.1.1 to 2.4.1. When I take the upgrade recommendation, the gradle sync fails, therefore I am unable to build my project. The error was obscured as I inherited this old project that is several versions behind and I updated all (most) of the frameworks and could not pin-point to this single dependency. I started over and upgraded selectively piecemeal until this was the lone down-level dependency.
I will try again at a later time when there is yet another update
to include.
dependencies {
classpath 'com.android.tools.build:gradle:4.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.3.5'
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.8.4'
classpath 'org.jacoco:org.jacoco.core:0.8.0'
// Unable to build with v2.4.1 of firebase-crashlytics-gradle on this version of build (2021/02/02)
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.1.1'
}
Related
I tried to add jackson dependancies in android studio, the dependencies search within the android studio returned some other libraries, but when i hardcored these dependencies it synced successfully. So basically the results came from rather than bintray.com ?
compile 'com.fasterxml.jackson.core:jackson-databind:2.8.5'
compile 'com.fasterxml.jackson.core:jackson-core:2.8.5'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.8.5'
It seems that all the dependencies exist in JCenter (under bintray.com).
Here are the links in Jcenter to each of the dependencies you were looking for:
jackson-databind
jackson-core
jackson-annotations
You can also see that the JCenter is updated until version 2.8.6.
Please check if your Android Studio is configured to get all its dependencies from JCenter.
I assume that maybe there is a mistake in the basic search you have made, so if you can provide us with more information it will be much more helpful.
In any case you can contact JFrog Support to get more helpful details.
I am with JFrog, the company behind bintray and artifactory.
I am studing Mybatis and this is my build.gradle file
but when I refresh it,IntelliJ IDEA told me "could not resolve all dependencies for configuration ':runtime'"
How can I fix it?
It seems, you have an "offline mode" turned on, while created your Gradle project in IDE. Check the project setting, find a Gradle tab and turn off "Offline mode". Here you can find some more related info, about the way to disable it.
Note, that this option is used to turn off any Gradle network activity and make it impossible to download your dependencies if the are not yet cached or not added via file dependencies.
After Android SDK updated to 6.0 today, I am unable to run my project. The error is:
Gradle 'Alphaets' project refresh failed.
Cause:java.io.FileNotFoundException: ...\project_name\src\main\AndroidManifest.xml(The system cannot find the path specified).
Actually, it should be ...\project_name\app\src\main\AndroidManifest.xml. Part ...\app\... is missing. There is no \src\ folder in \project_name\. That's why AndroidStudio cannot find AndroidManifest.xml.
What causes such an error? How should I revise the gradle file to include the correct path of AndroidManifest.xml?
Besides, my build.gradle(Module:app) did not show up in the GradleScripts any more. I have to go to the absolute path of that file and open it with notepad++. What's wrong with that?
It turns out to be redundant codes in file "build.gradle(Project: MyProject)". I added these code:
dependencies{}
This prevents the file "build.gradle(Module:app)" from being loaded. I did not know the principle, but after I deleting these lines, the project works.
I am also had the same Issue, when I am trying to open existing project.
My problem is related to Facebook resource(D:\GiriBabu_project\CalendarApp-24-08-2016\CalenderApp\app\build\intermediates\res\merged\debug\drawable-mpdpi\some.png) not found.
I just update the existing Facebook-android sdk. then It resolved that issue.
So this issue always regarding to your dependencies. Just find the error regarding to which package in your dependencies and update it.
Another mistake may be your SDK version not match with the in gradle version. so you should change the SDK versions also. (existing projects SDK version numbers not update automatically)
if you don't know the proper version number just create the new project, then automatically know the gradle version and sdk versions.
Is there any documentation on converting a application.mk/android.mk file to a gradle based build.gradle file?
good links, QArea. Thanks a lot!
At this moment NDK support in Gradle are very limited. If you need to assemble something that gradle not provides that function
I do like this.
I collect the old-fashioned, but to .so-patches automatically picks up the Gradle-plugin:
ndk-build -j4 NDK_LIBS_OUT=src/main/jniLibs
Otherwise, you must wait for next version of gradle 0.13. Devs promise that NDK will fix integration with NDK.
I made a script tool to convert android.mk building system to gradle building system, because I wanted to test the demo source codes in:
https://android.googlesource.com/platform/development/+/05523fb0b48280a5364908b00768ec71edb847a2/samples
But after searching whole internet, I found no one did it yet. So I created this tool by myself. But even with this tool, we couldn't ensure all projects in AndroidSamples could be built and executed successfully because of the API versions and features mismatch. So I created my own projects for https://android.googlesource.com/platform/development/+/05523fb0b48280a5364908b00768ec71edb847a2/samples
And I want to convert those demo projects one by one.
Now the whole source codes are here:
https://github.com/clockzhong/AndroidSamples
I already successfully converted some samples into gradle building system and executed them correctly on my android phones. But I still have some version mismatch issues, anyway, I'll mentioned it in the project check-in comments.
I am using IDEA - 11.1.1 and gradle - gradle-1.0-milestone-9 (I tried with release candidate 3 also) on windows-7 (if this matters)
After importing gradle porject, IDEA complains about String object. I think I am missing something about grrovy configuration. I have also marked - main and test folder as Sources and Test Resources respectively. Did I miss something obvious?
Most likely the JDK isn't set correctly in IDEA. Go to File -> Project Structure -> Project and check/fix Project SDK.
Try checking your project and module sdk.
On your module select F4 or Right click "Open Module Settings"
Check your SDK and Moduel SDK
I am sure that will resolve your problem.
Check your IDEA project settings and look if your JDK is configured properly.
I suggest you use the gradle idea plugin to create your IDEA project files, instead of using the import function of existing gradle projects into IDEA, since from my experience it gave me troubles. Also adding new jars via gradle and updating your IDEA project files via gradle seems more consistent.
I uploaded a build.gradle gist, which might give you a good start:
https://gist.github.com/1580234
It contains some explanatory comments.
Greets,
Jan