我做了一个像Instagram这样的应用程序,一切都运行得很好,除了当新用户创建一个配置文件时,应用程序停止/崩溃,因为它在主页上没有显示任何东西,并且它丢弃了`java.util.NoSuchElementException: List is empty。 下面是完整的错误 E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.homeactivity, PID: 14508
java.util.NoSuchElementException: List is empty.
at kotlin.collections
我第一次在地图上和firebase一起工作,并且一直致力于依赖问题。
Please fix the version conflict either by updating the version of the google-services plugin (information about the latest version is available at https://bintray.com/android/android-tools/com.google.gms.google-services/) or updating the version of com.google.andro
以前,我正试图在android上运行这个颤振应用程序,但是在我将targetSdkVersion更改为targetSdkVersion 31之后,我开始得到这样的错误:
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not resolve com.google.firebase:firebase-core:25
当我将flutter_camera_ml_vision添加到现有项目时,我得到了以下错误。
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find com.google.firebase:firebase-ml-vision:.
Req
因此,我试图在我的项目中添加这个groupie,但是我一直收到这样的错误:
Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 is also present at [androidx.core:core:1.0.0] AndroidManifest
我试图操作对话框中的视图,但检索视图的唯一方法是Java的老式方法,如下所示:
class MyDialog: DialogFragment() {
override fun onCreateDialog(savedInstanceState: Bundle?): Dialog {
val alert = AlertDialog.Builder(context!!)
val inflater = LayoutInflater.from(activity)
val view = inflater?.infl
在过去的3天里,我尝试了所有我能想到的-更新了gradle,但是当我运行flutter build apk和flutter build appbundle时,我得到了同样的错误: FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'apple_sign_in'.
> SDK location not found. Define location with sdk.dir in the local.properti
我的依赖关系有问题,但是我做了本指南中的所有事情。并尝试删除Gradle应用程序文件中的“排除”和"useVersion“依赖项。
构建日志(您可以从firebase和google服务库中看到双重类):
Duplicate class com.google.android.gms.measurement.AppMeasurement$ConditionalUserProperty found in modules jetified-firebase-analytics-impl-12.0.1-runtime.jar (com.google.firebase:firebase-analy
从今天开始的Firebase -这似乎很容易,但目前我做了完全错误的事情。
我的构建错误:
Error:Execution failed for task ':app:preDebugBuild'. Android dependency
'com.google.firebase:firebase-core' has different version for the compile
(9.0.0) and runtime (11.2.0) classpath. You should manually set the same version via Depe
出现此错误:无法在当前上下文中执行任务集的DefaultTaskContainer#register(String,Class,Action)。IDE中没有显示详细信息,但Android Studio在更新后无法运行应用程序。我正在使用android studio开发我的一个项目。问题突然发生了。
下面是我的gradle文件:项目级别:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotli
我相对来说是个新手,两天前这个项目就开始运作了。当我今天尝试运行它时,我遇到了这个错误。这就是我面临的错误。
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:processDebugResources'.
> Could not resolve all task dependencies for configuration ':app:debugRuntimeClasspath'.
更新:当我在一个类的方法中编写一个lambda时,这个bug总是会出现,我引用的是那个类的一个变量。当我引用方法内部的变量时,它不会出现。
我将介绍一个使用Firebase进行Kotlin开发的简单指南。但不知何故,Android Studio现在的代码完成有点被这个问题打破了。
我有一个名为FirestoreUtil的类,其中有private val currentUserDocRef,即使在这个类中编写代码,我也不能让代码完成正常工作。
这个问题适用于我在这个项目中编写的所有类。
我会开始输入'currentUs‘等等。看它建议变量和它的类型。我选择它,而不是仅仅写
current