我不得不在构建时遇到问题.我添加了构建firebase核心16.0.0,但是在构建时,这是构建firebase核心17.0.0.为什么它构建17.0.0.I检查android https://firebase.google.com/docs/android/setup#available_libraries,现在版本16.0.0,我必须删除构建项目,但这不成功.你能帮助我吗?谢谢.
当我增加版本构建
classpath 'com.google.gms:google-services:4.0.1' // google-services plugin
Run Code Online (Sandbox Code Playgroud)
和
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
//them multiDexEnabled = true
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
// butter knife.
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
// gson.
implementation 'com.google.code.gson:gson:2.8.2'
// image loading.
implementation 'com.github.bumptech.glide:glide:4.7.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1'
implementation "com.github.bumptech.glide:okhttp3-integration:4.7.1"
implementation 'com.github.bumptech.glide:annotations:4.7.1'
//com.squareup.retrofit2
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'
//com.squareup.okhttp3
implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0'
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
//io.reactivex.rxjava2
implementation 'io.reactivex.rxjava2:rxandroid:2.0.2'
implementation 'io.reactivex.rxjava2:rxjava:2.1.13'
// keyboard keyboardvisibilityevent
implementation …Run Code Online (Sandbox Code Playgroud) java.lang.IllegalArgumentException:未知的 URL 内容://media/external/images/media 位于 android.content.ContentResolver.insert(ContentResolver.java:1837)
与某些设备。其中有故障的设备是 Redmi 9A
ContentResolver contentResolver = context.getContentResolver();
ContentValues contentValues = new ContentValues();
contentValues.put(MediaStore.MediaColumns.TITLE, fileName);
contentValues.put(MediaStore.MediaColumns.DISPLAY_NAME, fileName);
contentValues.put(MediaStore.MediaColumns.MIME_TYPE, getMimeType(context, Uri.parse(pathFile)));
contentValues.put(MediaStore.MediaColumns.RELATIVE_PATH, Environment.DIRECTORY_PICTURES);
contentValues.put(MediaStore.MediaColumns.IS_PENDING, Cursor.FIELD_TYPE_INTEGER);
// add datetime
long now = System.currentTimeMillis() / 1000;
contentValues.put(MediaStore.MediaColumns.DATE_ADDED, now);
contentValues.put(MediaStore.MediaColumns.DATE_MODIFIED, now);
contentValues.put(MediaStore.MediaColumns.DATE_TAKEN, now);
//Media image.
Uri uriTarget = contentResolver.insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, contentValues);
Run Code Online (Sandbox Code Playgroud) 错误:I/O错误:远程主机强行关闭现有连接
我尝试杀死并重置ADB但没有解决方案.(三星Galaxy S5发生了错误).
当我构建应用程序到Android工作室3.1与模拟器api <26没有错误,但当我构建api> 26错误.我没有使用kotlin因为没有导入kotlin,但是构建api> 26错误. > kotlin.KotlinNullPointerException(无错误消息).
com.android.build.gradle.tasks.ir.InstantRunMainApkResourcesBuilder $ ConfigAction.execute(InstantRunMainApkResourcesBuilder.kt:129)
建立gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "vn.top12.app"
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled = true
// blur
renderscriptTargetApi 18
renderscriptSupportModeEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
signingConfigs {
release {
keyAlias "top12vn"
keyPassword "top12vn"
storeFile file('key_store/top12_released_key.keystore')
storePassword "top12vn"
}
debug {
keyAlias "top12vn"
keyPassword "top12vn"
storeFile file('key_store/top12_released_key.keystore')
storePassword "top12vn"
}
}
lintOptions { …Run Code Online (Sandbox Code Playgroud)