I use Crashlytics SDK in my app (with Mopub and Twitter SDK's). All work normal, but after last update I dont get message with crashes.
Before update
After update (only last app version)
In my project I make all instructions from manual:
build.gradle
buildscript {
repositories {
...
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
...
classpath 'io.fabric.tools:gradle:1.+'
}
}
...
apply plugin: 'io.fabric'
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
...
dependencies {
...
compile('com.crashlytics.sdk.android:crashlytics:2.2.1#aar') {
transitive = true;
}
compile('com.twitter.sdk.android:twitter-core:1.0.0#aar') {
transitive = true;
}
compile('com.mopub.sdk.android:mopub:3.3.0#aar') {
transitive = true;
}
}
In my code I start Crashlytics in MainActivity:
Fabric.with(this, new Crashlytics());
P.S. Fabric plugin dont show no errors and alerts and show me crashes from previous app version.
I decided it this way: I remove my app from fabric.io, re-install fabric plugin in Android Studio, and change this lines in my build.gradle file:
compile('com.crashlytics.sdk.android:crashlytics:2.2.1#aar') {
transitive = true;
}
compile('com.twitter.sdk.android:twitter-core:1.0.0#aar') {
transitive = true;
}
compile('com.mopub.sdk.android:mopub:3.3.0#aar') {
transitive = true;
}
and I change this line in my Application class:
Fabric.with(this, new TwitterCore(authConfig), new MoPub(), new Crashlytics());
Next I run my app and test this with this line:
throw new RuntimeException();
Related
I do not understand what to do with this plugin, I have been suffering for an hour .. My version is android studio 7.0.2
here is the code
photoViewVersion = "2.3.0"
}
dependencies {
implementation "com.github.chrisbanes:PhotoView:$photoViewVersion"
}```
Make sure you have the following in the build.gradle(Project level)
allprojects {
repositories {
maven { url "https://www.jitpack.io" }
}
}
buildscript {
repositories {
maven { url "https://www.jitpack.io" }
}
}
Also try putting the dependency in the following manner in your gradle file (App level)
dependencies {
def photoViewVersion = "2.3.0"
implementation "com.github.chrisbanes:PhotoView:$photoViewVersion"
}
Try adding maven { url "https://jitpack.io" } to your top level gradle build file.
See: https://github.com/Lichenwei-Dev/ImagePicker/issues/1
I want to use the #Preview annotation in my brand new Jetpack Compose for Desktop project. However gradle is just not getting it done to fetch the dependecy for that.
my build.gradle.kts:
import org.jetbrains.compose.compose
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
plugins {
kotlin("jvm") version "1.4.0"
// __LATEST_COMPOSE_RELEASE_VERSION__
id("org.jetbrains.compose") version (System.getenv("COMPOSE_TEMPLATE_COMPOSE_VERSION") ?: "0.1.0-build113")
}
repositories {
jcenter()
maven("https://maven.pkg.jetbrains.space/public/p/compose/dev")
}
buildscript {
repositories {
google()
}
dependencies {
classpath("androidx.ui:ui-tooling:1.0.0-alpha07")
}
}
dependencies {
implementation(compose.desktop.currentOs)
}
compose.desktop {
application {
mainClass = "MainKt"
nativeDistributions {
targetFormats(TargetFormat.Dmg, TargetFormat.Msi, TargetFormat.Deb)
packageName = "KotlinJvmComposeDesktopApplication"
}
}
}
It just is not being resolved
Accordingly to the documentation, it should be working for alpha07, but for alpha08 it changed to androidx.compose.ui:ui-tooling:1.0.0-alpha08, so, if you can upgrade to alpha08, you can see if it works.
https://developer.android.com/jetpack/androidx/releases/ui#declaring_dependencies
I have JFrog Open Source installed on a server and upload an android aar library by hand.
In the gradle file, I set up a configuration like this.
buildscript {
dependencies { classpath "org.jfrog.buildinfo:build-info-extractor-gradle:latest.release" }
repositories {
maven {
credentials {
username = artifactory_username
password = artifactory_password
}
url "https://.../artifactory/libs-release"
}
}
}
allprojects{
apply plugin: org.jfrog.gradle.plugin.artifactory.ArtifactoryPlugin
artifactory {
resolve {
contextUrl = "https://.../artifactory"
repoKey = 'libs-global'
username = artifactory_username
password = artifactory_password
}
}
}
buildscript {
repositories {
jcenter()
}
dependencies {
classpath "org.jfrog.buildinfo:build-info-extractor-gradle:latest.release"
}
}
apply plugin: "com.jfrog.artifactory"
QUESTION:
How can download or implement my aar libary in the android project?
Example:
implementation 'com.google.code.gson:gson:2.8.6'
You need to add your Jfrog in build.gradle(project) like this:
allprojects {
repositories {
...
maven {
url("https://your-url.jfrog.com/more/path")
}
google()
jcenter()
...
}
}
Then you just add your dependency in dependencies.
I'm trying to add new TweetComposer to my project at module "app":
dependencies {
compile('com.twitter.sdk.android:tweet-composer:1.0.5#aar') {
transitive = true;
}
}
And I always got error like this:
Error:Could not find com.twitter.sdk.android:tweet-composer:1.0.5.
Required by:
reader-android:app:unspecified
Search in build.gradle files
I found the issue:
add at project level the following code
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
}
And at application level
dependencies {
compile('com.twitter.sdk.android:tweet-composer:1.0.5#aar') {
transitive = true;
}
}
You should then be able to sync Gradle correctly, let me know if that works for you!
Reference here
I am getting error while init Fabric with Fabric.with(this);.
My build.gradle is below:
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.21.2'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
...
dependencies {
...
//twitter fabric sdk
compile('com.stripe:stripe-android:1.0.0.1#aar') {
transitive = true;
}
compile('io.fabric.sdk.android:fabric:1.3.10#aar') {
transitive = true;
}
My error log is as below:
java.lang.NoClassDefFoundError: Failed resolution of: Lio/fabric/sdk/android/DefaultLogger;
at io.fabric.sdk.android.Fabric.(Fabric.java:56)
at io.fabric.sdk.android.Fabric.with(Fabric.java:308)
I got my answer Here
I just replace
Fabric.with(this)
with
TwitterAuthConfig authConfig = new TwitterAuthConfig(TWITTER_KEY, TWITTER_SECRET);
Fabric.with(this, new Twitter(authConfig));