一切正常,然后我尝试添加一些社交登录帮助程序库并第一次面对这个问题,然后我将其删除,问题仍然存在。
google或android的每个依赖都能正常工作。
但是每个以com.github开头的依赖都会失败。
app gradle
IllegalOrphanException: This Parent (model.Parent[ id=1 ]) cannot be destroyed since the Child model.Child[ parentId=1 ] in its child field has a non-nullable parent field.
Project gradle,
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "application_id"
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
renderscriptTargetApi 14
renderscriptSupportModeEnabled true
vectorDrawables.useSupportLibrary = true
}
dexOptions {
javaMaxHeapSize "4g"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '26.1.0'
}
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:support-v4:26.1.0'
compile 'com.android.support:support-compat:26.1.0'
compile 'com.android.support:cardview-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
compile 'com.android.support:multidex:1.0.2'
implementation "com.mikepenz:iconics-core:3.0.0@aar"
implementation "com.mikepenz:iconics-views:3.0.0@aar"
implementation 'com.mikepenz:google-material-typeface:3.0.1.2.original@aar'
compile 'com.google.firebase:firebase-core:11.6.2'
compile 'com.google.firebase:firebase-database:11.6.2'
compile 'com.google.firebase:firebase-storage:11.6.2'
compile 'com.google.firebase:firebase-auth:11.6.2'
compile 'com.google.firebase:firebase-messaging:11.6.2'
compile 'com.google.firebase:firebase-ads:11.6.2'
compile 'com.google.firebase:firebase-firestore:11.6.2'
compile 'com.google.firebase:firebase-crash:11.6.2'
compile 'com.firebaseui:firebase-ui-database:3.1.0'
compile 'de.hdodenhof:circleimageview:2.2.0'
implementation 'com.github.bumptech.glide:glide:4.4.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.4.0'
compile 'com.aurelhubert:ahbottomnavigation:2.1.0'
compile 'com.vanniktech:emoji-twitter:0.5.1'
compile 'com.github.jaychang0917:SimpleAuth:{latest_version}'
}
apply plugin: 'com.google.gms.google-services'
像Glide这样的依赖性工作正常。刚刚重启我的android工作室并面临同样的问题。
需要帮助:(
答案 0 :(得分:2)
我从未遇到过这种语法
compile 'com.github.jaychang0917:SimpleAuth:{latest_version}'
所以我认为它错了,你想用实际版本替换{}
,我想它只是作为README中的一个例子。尝试:
compile 'com.github.jaychang0917:SimpleAuth:1.0.5'