Android I';我正在尝试应用crashlytics,gradle中发生了一个错误
存在一个问题,现有的应用程序经常被迫终止。 在搜索相关技术以报告来自这些远程设备的错误消息时,我遇到了firebase crashlytics,并希望应用它 但是,当我根据指南添加代码时,问题出现在gradle脚本中 请尝试使用以下链接: 新添加的代码介于_u之间Android I';我正在尝试应用crashlytics,gradle中发生了一个错误,android,firebase,android-gradle-plugin,crashlytics,Android,Firebase,Android Gradle Plugin,Crashlytics,存在一个问题,现有的应用程序经常被迫终止。 在搜索相关技术以报告来自这些远程设备的错误消息时,我遇到了firebase crashlytics,并希望应用它 但是,当我根据指南添加代码时,问题出现在gradle脚本中 请尝试使用以下链接: 新添加的代码介于_u之间 // project gradle buildscript { repositories { google() jcenter() __maven {
// project gradle
buildscript {
repositories {
google()
jcenter()
__maven {
url 'https://maven.fabric.io/public'
}__
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
__classpath 'com.google.gms:google-services:4.3.0'
classpath 'io.fabric.tools:gradle:1.31.0'__
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
同步失败消息
-> ASCII
运行生成消息
-> org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwareException: Build file '${project}\app\build.gradle' line: 1
-> A problem occurred evaluating project ':app'
...\
-> Caused by: org.gradle.internal.exceptions.LocationAwareException: Build file '${project}\app\build.gradle' line: 1
我不明白问题是什么,因为错误消息根本没有意义。我不知道这是否只是我所指的库之间的编码错误或版本问题。在清单中添加以下行:
<meta-data android:name="firebase_crashlytics_collection_enabled" android:value="false" />
创建多索引应用程序
类:
buildTypes {
release {
multiDexEnabled true;
}
debug {
multiDexEnabled true;
}
}
dependencies {
implementation 'com.android.support:multidex:1.0.3'
}
公共类MyApplication扩展了多索引应用程序{
@凌驾
public void onCreate(){
super.onCreate();
Fabric.with(this,newcrashlytics());
}
}
在AndroidManifest.xml
<application
...
android:name=".MyApplication"
...
</application>
将以下行添加到您的清单中:
<meta-data android:name="firebase_crashlytics_collection_enabled" android:value="false" />
创建多索引应用程序
类:
buildTypes {
release {
multiDexEnabled true;
}
debug {
multiDexEnabled true;
}
}
dependencies {
implementation 'com.android.support:multidex:1.0.3'
}
公共类MyApplication扩展了多索引应用程序{
@凌驾
public void onCreate(){
super.onCreate();
Fabric.with(this,newcrashlytics());
}
}
在AndroidManifest.xml
<application
...
android:name=".MyApplication"
...
</application>
您是否尝试过清理和重建项目?检查您的类或xms中是否有错误。有关更多信息,我建议您查看堆栈上的帖子overflow@solaza我重建了很多次,但都没用。在家里把所有的密码都破解了,边喝啤酒边编码,解决了这个问题。编码的朋友是比尔。@AlirezaBideli thansk征求你的意见!你们试过清理和重建项目吗?检查你们的类或xms中是否有错误。有关更多信息,我建议您查看堆栈上的帖子overflow@solaza我重建了很多次,但都没用。在家里把所有的密码都破解了,边喝啤酒边编码,解决了这个问题。编码的朋友是比尔。@AlirezaBideli thansk征求你的意见!我不确定问题出在哪里,但我清理了所有代码,然后在家里再试了一次。谢谢你的建议!我不确定问题出在哪里,但我清理了所有代码,然后在家里再试了一次。谢谢你的建议!