我正在使用kotlin + Rxjava + MVVM工作一个项目.在开发过程中面临在Fragment或viewholder中导入视图ID的问题.
import kotlinx.android.synthetic.main.layout.* 未使用kotlin.
Normaly view id应该从kotlin合成布局导入中使用,但它直接从R.id导入它不应该发生.
Kotlin插件版本: org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.40
我的gradle文件:
apply plugin: 'com.android.feature'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'idea'
apply plugin: 'kotlin-kapt'
android {
compileSdkVersion 27
baseFeature true
defaultConfig {
minSdkVersion 23
targetSdkVersion 27
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
abortOnError false
}
}
dependencies {
api "com.android.support:design:$rootProject.support_library_version"
api "com.android.support:appcompat-v7:$rootProject.support_library_version"
api "com.android.support:recyclerview-v7:$rootProject.support_library_version"
api "com.android.support:support-dynamic-animation:$rootProject.support_library_version"
api "com.android.support:cardview-v7:$rootProject.support_library_version"
api "com.android.support:customtabs:$rootProject.support_library_version"
api "com.android.support.constraint:constraint-layout:1.1.0-beta5" …Run Code Online (Sandbox Code Playgroud) 我正在开发Web RTC中的视频聊天应用程序.
我正在阅读Web RTC的文档.
我已按照获取代码中提到的所有步骤进行操作
export GYP_DEFINES="OS=android"
fetch --nohooks webrtc_android
gclient sync
Run Code Online (Sandbox Code Playgroud)
我在我的根目录中有web rtc的所有src代码.根据文档说我们必须编译源代码以在我们的应用程序中使用.这里我使用以下命令编译源时出错.
$ gn gen out/Default --args='target_os="android" target_cpu="arm"'
ERROR at //build/config/android/internal_rules.gni:636:3: Can't load input file.
import("//third_party/ijar/ijar.gni")
^-----------------------------------
Unable to load:
/Users/c86/webrtc-checkout/src/third_party/ijar/ijar.gni
I also checked in the secondary tree for:
/Users/c86/webrtc-checkout/src/build/secondary/third_party/ijar/ijar.gni
See //build/config/android/rules.gni:8:1: whence it was imported.
import("//build/config/android/internal_rules.gni")
^-------------------------------------------------
See //webrtc/examples/BUILD.gn:12:3: whence it was imported.
import("//build/config/android/rules.gni")
^----------------------------------------
See //BUILD.gn:13:5: which caused the file to be included.
"//webrtc/examples",
^------------------
Run Code Online (Sandbox Code Playgroud)
我怎么解决这个问题?我是否正在朝着Web RTC开发视频聊天应用的方向发展?
我按照以下admob文档步骤整合了admob横幅广告.
我正在使用模拟器获得测试广告.并使用以下说明获取广告.
AdRequest.Builder.addTestDevice("F3F05FA129EF5A4FEEF9DCC4F3A96936")
Run Code Online (Sandbox Code Playgroud)
如果我使用发布版本配置运行应用程序获取错误日志下面的错误
07-14 17:50:01.461 16693-16693/xx.xxxxx I/Ads: Starting ad request.
07-14 17:50:02.164 16693-16693/xx.xxxxx I/Ads: Use AdRequest.Builder.addTestDevice("F3F05FA129EF5A4FEEF9DCC4F3A96936") to get test ads on this device.
07-14 17:50:02.913 16693-16847/xx.xxxxx W/Ads: There was a problem getting an ad response. ErrorCode: 0
07-14 17:50:03.478 16693-16693/xx.xxxxx W/Ads: Failed to load ad: 0
Run Code Online (Sandbox Code Playgroud)
如果导出apk与发布配置低于错误.
07-14 18:00:19.125 23074-23074/xx.xxxxx I/Ads: Starting ad request.
07-14 18:00:19.126 23074-23074/xx.xxxxx I/Ads: Use AdRequest.Builder.addTestDevice("F3F05FA129EF5A4FEEF9DCC4F3A96936") to get test ads on this device.
07-14 18:00:19.656 29969-23211//xx.xxxxx W/Ads: Received error HTTP response code: 403
07-14 18:00:20.040 …Run Code Online (Sandbox Code Playgroud) 我正在使用 amazon dynamodb 服务开发 Android 应用程序。
由于我必须保存用户基本信息和密码,所以请让我知道在 dynamodb 中保存密码的最佳方法是什么?
android amazon-web-services password-encryption amazon-dynamodb