这里我添加更多信息!当我将项目导入Android Studio时,我遇到了这个问题!你能帮我把它想得多吗!````````````````````````````````````````` ```````````````````
Caused by: org.gradle.api.UncheckedIOException: Could not normalize path for file '\\ ...'.
at org.gradle.api.internal.file.AbstractFileResolver.normalise(AbstractFileResolver.java:141)
at org.gradle.api.internal.file.AbstractFileResolver.resolve(AbstractFileResolver.java:83)
at org.gradle.api.internal.file.AbstractFileResolver.resolve(AbstractFileResolver.java:63)
at org.gradle.api.internal.file.AbstractFileResolver.convertObjectToURI(AbstractFileResolver.java:177)
at org.gradle.api.internal.file.AbstractFileResolver.resolveUri(AbstractFileResolver.java:168)
at org.gradle.api.internal.artifacts.repositories.DefaultMavenArtifactRepository.getUrl(DefaultMavenArtifactRepository.java:65)
at org.gradle.api.internal.artifacts.repositories.DefaultMavenArtifactRepository_Decorated.getUrl(Unknown Source)
at org.gradle.api.internal.artifacts.repositories.DefaultMavenArtifactRepository.createRealResolver(DefaultMavenArtifactRepository.java:97)
at org.gradle.api.internal.artifacts.repositories.DefaultMavenArtifactRepository.createResolver(DefaultMavenArtifactRepository.java:93)
at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.ResolveIvyFactory.create(ResolveIvyFactory.java:91)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultArtifactDependencyResolver.createComponentSource(DefaultArtifactDependencyResolver.java:114)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultArtifactDependencyResolver.access$100(DefaultArtifactDependencyResolver.java:56)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultArtifactDependencyResolver$1.execute(DefaultArtifactDependencyResolver.java:81)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultArtifactDependencyResolver$1.execute(DefaultArtifactDependencyResolver.java:78)
at org.gradle.internal.Transformers$4.transform(Transformers.java:137)
at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyContextManager.withIvy(DefaultIvyContextManager.java:61)
at org.gradle.api.internal.artifacts.ivyservice.DefaultIvyContextManager.withIvy(DefaultIvyContextManager.java:39)
at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultArtifactDependencyResolver.resolve(DefaultArtifactDependencyResolver.java:78)
at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDependencyResolver$1.run(CacheLockingArtifactDependencyResolver.java:41)
at org.gradle.internal.Factories$1.create(Factories.java:22)
at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:192)
at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:175)
at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:106)
at org.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache.useCache(DefaultCacheFactory.java:187)
at org.gradle.api.internal.artifacts.ivyservice.DefaultCacheLockingManager.useCache(DefaultCacheLockingManager.java:64)
at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDependencyResolver.resolve(CacheLockingArtifactDependencyResolver.java:39)
at org.gradle.api.internal.artifacts.ivyservice.DefaultConfigurationResolver.resolve(DefaultConfigurationResolver.java:91)
at org.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyConfigurationResolver.resolve(SelfResolvingDependencyConfigurationResolver.java:40)
at org.gradle.api.internal.artifacts.ivyservice.ShortCircuitEmptyConfigurationResolver.resolve(ShortCircuitEmptyConfigurationResolver.java:52)
at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingConfigurationResolver.resolve(ErrorHandlingConfigurationResolver.java:43)
... 83 more
Caused by: java.io.IOException: Invalid argument
at java.io.WinNTFileSystem.canonicalize0(Native Method)
at java.io.WinNTFileSystem.canonicalize(WinNTFileSystem.java:428)
at java.io.File.getCanonicalPath(File.java:618)
at java.io.File.getCanonicalFile(File.java:643)
at org.gradle.api.internal.file.AbstractFileResolver.normalise(AbstractFileResolver.java:98)
... 112 more
这里是gradle
apply plugin: 'com.android.application'
apply plugin: 'me.tatarka.retrolambda'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "io.itit.ititeducation"
minSdkVersion 19
targetSdkVersion 21
versionCode 43
versionName "1.5.3"
}
buildTypes {
debug {
// Disable fabric build ID generation for debug builds
ext.enableCrashlytics = false
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
android.applicationVariants.all {
variant ->
variant.outputs.each {
output ->
output.outputFile = new File(output.outputFile.parent, "科达智慧教育_io.itit.ititeducation_v"
+ defaultConfig.versionName + "_" + defaultConfig.versionCode + ".apk");
}
}
dexOptions {
maxProcessCount 8
javaMaxHeapSize "4g"
}
sourceSets {
main {
jniLibs.srcDirs = ['libs']
}
}
compileOptions {
targetCompatibility 1.8
sourceCompatibility 1.8
}
}
repositories {
maven { url '// ...' }
maven { url 'https://jitpack.io' }
flatDir {
dirs 'libs'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile('com.mikepenz:materialdrawer:5.1.2@aar') {
transitive = true
}
compile files('libs/zxing.jar')
compile files('libs/jg_filter_sdk_1.1.jar')
compile files('libs/wup-1.0.0.E-SNAPSHOT.jar')
compile files('libs/Xg_sdk_v2.42_20160111_1539.jar')
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.android.support:recyclerview-v7:23.3.0'
compile 'com.github.afollestad.material-dialogs:core:0.8.5.8'
compile 'com.github.afollestad.material-dialogs:commons:0.8.5.8'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
compile 'com.android.support:design:23.3.0'
compile 'com.android.support:support-v4:23.3.0'
compile 'com.android.support:cardview-v7:23.3.0'
compile 'me.imid.swipebacklayout.lib:library:1.0.0'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'cn.trinea.android.common:trinea-android-common:4.2.15'
compile 'com.github.orhanobut:logger:1.12'
compile 'org.xutils:xutils:3.3.25'
compile 'de.greenrobot:greendao:2.1.0'
compile 'com.github.rey5137:material:1.2.2'
compile 'org.greenrobot:eventbus:3.0.0'
compile 'in.srain.cube:ultra-ptr:1.0.11'
compile 'com.romainpiel.shimmer:library:1.4.0@aar'
compile 'com.mikepenz:iconics-core:2.5.10@aar'
compile 'com.mikepenz:google-material-typeface:2.2.0.1.original@aar'
compile 'com.mikepenz:material-design-iconic-typeface:2.2.0.1@aar'
compile 'com.github.qiujuer:genius:2.4.0'
compile 'com.tonicartos:superslim:0.4.13'
compile 'com.github.dexafree:materiallist:3.2.+'
compile 'com.github.dmytrodanylyk.shadow-layout:library:1.0.3'
compile 'com.liulishuo.filedownloader:library:0.2.0'
compile 'com.duwei.pinwheel:pinwheel:0.1'
compile 'com.oguzdev:CircularFloatingActionMenu:1.0.2'
compile 'se.emilsjolander:stickylistheaders:2.7.0'
compile 'com.baoyz.swipemenulistview:library:1.3.0'
compile 'com.github.dmytrodanylyk.circular-progress-button:library:1.1.3'
compile 'com.umeng.analytics:analytics:latest.integration'
compile 'com.makeramen:roundedimageview:2.2.1'
compile 'com.github.panwrona:DownloadProgressBar:1.1'
compile 'com.github.traex.rippleeffect:library:1.3'
compile files('libs/photo_library.jar')
compile files('libs/videocache.jar')
compile project(':videolib')
compile project(':itit_lib')
debugCompile 'com.squareup.leakcanary:leakcanary-android:1.4-beta2'
releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta2'
testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta2'
}
另一个
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'me.tatarka:gradle-retrolambda:3.3.0-beta4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
其他三个模块
1
apply plugin: 'com.android.library'
dependencies {
}
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
minSdkVersion 15
targetSdkVersion 21
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
jniLibs.srcDirs = ['libs']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
}
}
}
2
apply plugin: 'com.android.library'
apply plugin: 'me.tatarka.retrolambda'
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
useLibrary 'org.apache.http.legacy'
defaultConfig {
minSdkVersion 19
targetSdkVersion 21
versionCode 1
versionName "1.1"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
targetCompatibility 1.8
sourceCompatibility 1.8
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.alibaba:fastjson:1.2.8'
compile files('libs/gson-2.2.4.jar')
compile 'com.github.lazylibrary:lazylibrary:1.0.2'
compile 'com.android.support:design:23.3.0'
compile 'com.github.orhanobut:logger:1.12'
compile 'cn.trinea.android.common:trinea-android-common:4.2.15'
compile 'com.github.afollestad.material-dialogs:core:0.8.5.8'
compile 'com.github.afollestad.material-dialogs:commons:0.8.5.8'
compile 'com.mikepenz:iconics-core:2.5.10@aar'
compile 'com.mikepenz:google-material-typeface:2.2.0.1.original@aar'
compile 'com.mikepenz:material-design-iconic-typeface:2.2.0.1@aar'
compile 'com.github.rey5137:material:1.2.2'
compile 'com.joooonho:selectableroundedimageview:1.0.1'
compile('com.mikepenz:materialdrawer:5.1.2@aar') {
transitive = true
}
compile project(':videolib')
}
3
apply plugin: 'java'
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'de.greenrobot:greendao-generator:2.1.0'
}
答案 0 :(得分:0)
删除" maven {url' // ...' }" build.gradle中的一行
repositories {
**maven { url '// ...' }**
maven { url 'https://jitpack.io' }
flatDir {
dirs 'libs'
}
}