在服务中使用相机时,移动屏幕变得不可触摸(由透明窗口锁定)并且仅在出现错误之下
Access denied finding property "camera.hal1.packagelist"
Run Code Online (Sandbox Code Playgroud)
将是什么原因及其解决方案?请帮忙..
我在Android中使用Firebase云消息传递(FCM)API进行推送通知.当我实施那个时间完美的工作,但现在它找不到谷歌播放的服务.
错误是:
FirebaseInstanceId:后台同步失败:SERVICE_NOT_AVAILABLE,
请帮我解决一下.我在gradle文件中使用了以下依赖项.
dependencies {
compile files('libs/ksoap2-android-assembly-3.4.0-jar.jar')
compile 'com.android.support:appcompat-v7:23.0.0'
compile files('libs/gson-2.2.4.jar')
compile files('libs/activation.jar')
compile files('libs/mail.jar')
compile files('libs/additionnal.jar')
compile 'com.android.support:multidex:1.0.1'
compile 'com.facebook.android:facebook-android-sdk:4.14.0'
compile 'com.google.firebase:firebase-messaging:9.0.2'
compile('com.google.android.gms:play-services:9.0.2') {
exclude group: "play-services-wallet"
exclude module: "play-services-wallet"
exclude group: "play-services-ads"
exclude module: "play-services-ads"
}
}
Run Code Online (Sandbox Code Playgroud)
感谢您抽时间阅读.
在它看起来像这样之前(通过R.string.admob_application_id):
MobileAds.initialize(this, getString(R.string.admob_application_id));
Run Code Online (Sandbox Code Playgroud)
MobileAds方法.initialize(Context context, String applicationCode)
现在是:
此方法已弃用。使用
initialize(Context, OnInitializationCompleteListener)来代替。
其中写道:
初始化 Google 移动广告 SDK。尽早调用此方法以减少会话第一个广告请求的延迟。如果未调用此方法,第一个广告请求会自动初始化 Google 移动广告 SDK。
MobileAds.Settings也已弃用。
到目前为止我尝试过的是获取InitializationStatus每个适配器:
MobileAds.initialize(this, initializationStatus -> {
/* get the adapter status */
Map<String, AdapterStatus> map = initializationStatus.getAdapterStatusMap();
for (Map.Entry<String, AdapterStatus> entry : map.entrySet()) {
AdapterStatus adapterStatus = entry.getValue();
AdapterStatus.State state = adapterStatus.getInitializationState();
Log.d(LOG_TAG, "key = " + entry.getKey() + ", state = " + state.name() + ", desc = " + adapterStatus.getDescription());
} …Run Code Online (Sandbox Code Playgroud) 随着Gradle 4.10.1和Android Gradle插件的更新3.3.0,我得到以下警告:
警告:API'
variantOutput.getPackageApplication()'已过时,已替换为'variant.getPackageApplicationProvider()'.
该行,与周围的上下文(由构建变量分配输出文件名):
applicationVariants.all { variant ->
variant.outputs.all { output ->
if (variant.getBuildType().getName() in rootProject.archiveBuildTypes) {
def buildType = variant.getBuildType().getName()
if (variant.versionName != null) {
def baseName = output.baseName.toLowerCase()
String fileName = "${rootProject.name}_${variant.versionName}-${baseName}.apk"
// this is the line:
outputFileName = new File(output.outputFile.parent, fileName).getName()
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
该迁移指南是不是太有帮助; 虽然variant.outputs.all可能有问题 - 只是不知道要替换什么 - 并且迁移指南指的是任务而不是构建变体.禁用时File ? Settings ? Experimental ? Gradle ? Only sync the active variant,我会得到更多的弃用警告(重点是,这些方法都没有被直接调用): …
gradle build.gradle android-gradle-plugin deprecation-warning build-variant
我正在尝试运行 Android 材料设计,同样取自下面https://github.com/material-components/material-components-android
但出现这些错误:
failed
:lib:packageDebugResources
tokens.xml
Can't determine type for tag '<macro name="m3_comp_bottom_app_bar_container_color">?attr/colorSurface</macro>'
tokens.xml
Can't determine type for tag '<macro name="m3_sys_color_dark_surface_tint">?attr/colorPrimary</macro>'
fab_tokens.xml
Can't determine type for tag '<macro name="m3_comp_fab_primary_container_color">?attr/colorPrimaryContainer</macro>'
tokens.xml
Can't determine type for tag '<macro name="m3_comp_switch_selected_icon_color">?attr/colorOnPrimaryContainer</macro>'
tokens.xml
Can't determine type for tag '<macro name="m3_sys_motion_path">linear</macro>'
tokens.xml
Can't determine type for tag '<macro name="m3_sys_shape_corner_full_family">rounded</macro>'
tokens.xml
Can't determine type for tag '<macro name="m3_ref_typeface_brand_regular">sans-serif</macro>'
/Users/mac/AndroidStudioProjects/material-components-android/lib/java/com/google/android/material/bottomappbar/res/values/tokens.xml: Error: Can't determine type for tag '<macro name="m3_comp_bottom_app_bar_container_color">?attr/colorSurface</macro>'
Run Code Online (Sandbox Code Playgroud) 因此,要在gradle android中更改生成的APK文件名,我可以执行以下操作:
applicationVariants.output.all {
outputFileName = "the_file_name_that_i_want.apk"
}
Run Code Online (Sandbox Code Playgroud)
生成的App Bundle文件有类似的东西吗?如何更改生成的App Bundle文件名?
我在使用 Bouncycastle 时遇到了问题,这仅在运行:lint任务时出现。
通常它似乎是 Java 9 字节码版本 53.0 / ASM版本冲突。
这些是依赖项:
// https://mvnrepository.com/artifact/org.bouncycastle
implementation "org.bouncycastle:bcprov-jdk15on:1.64"
implementation "org.bouncycastle:bcpkix-jdk15on:1.64"
Run Code Online (Sandbox Code Playgroud)
这导致:lint任务抛出处理错误:
> Task :mobile:lint
Error processing bcpkix-jdk15on-1.64.jar:META-INF/versions/9/module-info.class: broken class file? (This feature requires ASM6)
Error processing bcprov-jdk15on-1.64.jar:META-INF/versions/9/module-info.class: broken class file? (This feature requires ASM6)
Run Code Online (Sandbox Code Playgroud)
META-INF/versions/9/module-info.class:类文件损坏?(此功能需要 ASM6)
这同样适用于:
// https://mvnrepository.com/artifact/com.google.code.gson/gson
implementation "com.google.code.gson:gson:2.8.6"
Run Code Online (Sandbox Code Playgroud)
自从升级1.4.1到1.4.2-native-mt,它又是一样的:
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:1.4.2-native-mt"
Run Code Online (Sandbox Code Playgroud)
kotlin-stdlib-1.4.0.jar:META-INF\versions\9\module-info.class:类文件损坏?(模块需要 ASM6)
我正在使用react-crud-shared作为使用Firebase Cloud Functions 的react-crud-backend 的依赖项。
在react-crud-backend我有以下内容:
{
"name": "react-crud-backend",
"description": "Cloud Functions for Firebase",
"scripts": {
...
},
"dependencies": {
...
"react-crud-shared": "file:../shared",
...
},
"engines": {
"node": "8"
},
"private": true,
"devDependencies": {
...
}
}
Run Code Online (Sandbox Code Playgroud)
在react-crud-shared我有以下内容:
{
"name": "react-crud-shared",
"version": "0.0.1",
"description": "",
"main": "src/index.js",
"private": true,
"dependencies": {
"lodash": "^4.17.11"
}
}
Run Code Online (Sandbox Code Playgroud)
它在开发中运行良好:“firebase serve --only functions”,但在部署时会引发错误:
Did you list all required modules in the package.json dependencies?
Detailed stack …Run Code Online (Sandbox Code Playgroud) 我正在尝试使用 Android Room 2.3.0,目前遇到以下编译错误:
项目道:
error: Not sure how to handle query method's return type (java.lang.Object). DELETE query methods must either return void or int (the number of deleted rows).
public abstract java.lang.Object deleteAllProjects(@org.jetbrains.annotations.NotNull()
error: Query method parameters should either be a type that can be converted into a database column or a List / Array that contains such type. You can consider adding a Type Adapter for this.
kotlin.coroutines.Continuation<? super kotlin.Unit> continuation);
error: Unused parameter: continuation
public abstract java.lang.Object …Run Code Online (Sandbox Code Playgroud) android ×8
firebase ×2
gradle ×2
java ×2
adb ×1
admob ×1
android-lint ×1
android-room ×1
bouncycastle ×1
build.gradle ×1
gson ×1
kotlin ×1
linux ×1
material3 ×1
npm ×1