我已经将我的应用程序发布到应用程序商店。我已经有几个版本了。我创建了一个内部测试组和一个外部测试组。
今天,我向 App Store Connect 发布了该应用程序的新版本,我想将其添加到内部测试组中。但不知何故,我无法选择它。当我进入内部测试组时,构建旁边没有 (+) 符号。当我去外部测试组时,有。当我选择构建并单击“组”旁边的 (+) 号时,我无法选择内部测试组。
我检查了构建版本。我应该正确地增加它。我也尝试禁用其他版本,但仍然不起作用。
以下是一些屏幕截图:
有什么想法这里可能有什么问题吗?
我有一个 flutter 应用程序,它在应用程序的不同屏幕中发出许多不同的 http 请求。现在,我想实现一些常规错误处理,例如,每当没有连接时,我想显示一个 SnackBar,无论我当前在应用程序中的哪个位置。我设法编写了一种方法,每次我的请求出现异常时都会调用该方法。现在,我想在这个方法中显示 SnackBar。但我无权访问此方法中的 BuildContext,也无法将其作为参数传递给该方法。
那么,有没有办法在没有上下文的情况下显示 SnackBar 呢?例如,获取当前活动屏幕的上下文,然后使用它来显示 SnackBar 的方法?
我已经为 Room 数据库添加了库。这是一个 androidX 库。我不太了解库(我是初学者),也不了解 AndroidX。我遇到了这些明显的合并错误,在研究解决方案时,我发现了 AndroidX 库。所以我想将我的项目迁移到 AndroidX,但 Android Studio 无法解析任何这些库。
我的构建gradle(应用程序):
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.financetracker.financetracker"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
def room_version = "2.1.0-alpha04"
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
implementation 'androidx.legacy:legacy-support-v4:1.0.0-beta01'
implementation 'com.google.android.material:material:1.0.0-beta01'
implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4' …Run Code Online (Sandbox Code Playgroud) 我正在开发一个 android 应用程序,用户可以在其中注册。为了保存用户数据,我使用 Firebase Firestore。因此,当用户注册时,FirebaseUser.userId会创建一个带有as id的文档。
val exampleObject = ExampleObject(exampleData1, exampleData2)
val firestoreUser = FirebaseAuth.getInstance().currentUser
firebaseFirestore
.collection("users")
.document(firestoreUser.uid)
.collection("exampleCollection")
.document("exampleDocument")
.set(exampleObject)
Run Code Online (Sandbox Code Playgroud)
为每个用户创建的文档只包含集合,因此 Firestore 只创建一个“虚拟文档”。那么,如何检查此文档是否存在?
firebaseFirestore
.collection("users")
.document(firestoreUser.uid)
.get()
.addOnSuccessListener { doc->
if(doc.exists()) {
} else {
}
}
Run Code Online (Sandbox Code Playgroud)
这不起作用,因为它只是一个“虚拟文件”,实际上并不存在