1

我正在使用 AIDE 中来自 github 的材料 IOS 模板存储库构建图标包。您可以在https://github.com/materialos/Android-Icon-Pack找到存储库 。但我收到一个错误,--dependency com.github.afollestad:inquiry:b13a58b902 not found error in build.gradle 文件。而且 IDE 也无法识别库资源并给出错误,例如未知实体 R。请帮我解决问题这是 build.gradle 文件。

    apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    applicationVariants.all { variant ->
        variant.outputs.each { output ->
            output.outputFile = new File(
                    output.outputFile.parent, "MaterialOS-${variant.versionName}.apk")
        }
}

    // Note to self, sample uses same keystore as Cabinet

    lintOptions {
        abortOnError false
}

    defaultConfig {
        applicationId "org.materialos.icons"
        minSdkVersion 17
        targetSdkVersion 23
        versionCode 9
        versionName "2.0.1"
        generatedDensities = []
    }

   buildTypes {
 //        debug {
//            signingConfig signingConfigs.production
//        }
        release {
//            signingConfig signingConfigs.production
            // Disable Proguard so our drawable-nodpi resources aren't removed
           minifyEnabled false
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    aaptOptions {
        additionalParameters "--no-version-vectors"
    }
}

repositories {
     mavenCentral()
     jcenter()
    maven { url "https://jitpack.io" }
}

dependencies {
    compile project(path: ':licensing')

    compile('com.github.afollestad.material-dialogs:core:0.8.5.7@aar') {
    transitive = true
}
compile('com.github.afollestad:drag-select-recyclerview:0.3.3@aar') {
    transitive = true
}

compile 'com.github.afollestad:bridge:3.2.0'
compile 'com.github.afollestad:sectioned-recyclerview:0.2.1'
compile 'com.github.afollestad:assent:0.2.1'
compile 'com.github.afollestad:inquiry:b13a58b902'
compile 'com.github.afollestad:icon-request:1.3.1'

compile 'me.zhanghai.android.materialprogressbar:library:1.1.5'

compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.android.support:recyclerview-v7:23.2.1'
compile 'com.android.support:support-v13:23.2.1'
compile 'com.android.support:design:23.2.1'
compile 'com.android.support:cardview-v7:23.2.1'
compile 'com.android.support:palette-v7:23.2.1'

compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.github.florent37:glidepalette:1.0.6@aar'

compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.google.android.apps.muzei:muzei-api:2.0'
compile 'com.makeramen:roundedimageview:2.2.1'

compile 'com.anjlab.android.iab.v3:library:1.0.+'
compile 'com.pluscubed:insets-dispatcher:0.1.3'

}

4

1 回答 1

0

1)删除或重命名旧项目文件夹

2)再次克隆项目(https://github.com/materialos/Android-Icon-Pack

3)导航到app文件夹,打开'build.gradle',点击'yes',等待maven仓库下载完成

4) 替换

dependencies {
compile project(path: ':licensing')

compile 'com.afollestad.material-dialogs:core:0.9.2.2'
compile 'com.afollestad:drag-select-recyclerview:0.3.6'
compile 'com.afollestad:bridge:3.2.5'
compile 'com.afollestad:sectioned-recyclerview:0.2.3'
compile 'com.afollestad:assent:0.2.5'
compile 'com.afollestad:icon-request:1.5.2'
compile 'com.afollestad:inquiry:4.1.2'

compile 'me.zhanghai.android.materialprogressbar:library:1.3.0'

compile "com.android.support:appcompat-v7:$GOOGLE_LIBS"
compile "com.android.support:recyclerview-v7:$GOOGLE_LIBS"
compile "com.android.support:support-v13:$GOOGLE_LIBS"
compile "com.android.support:design:$GOOGLE_LIBS"
compile "com.android.support:cardview-v7:$GOOGLE_LIBS"
compile "com.android.support:palette-v7:$GOOGLE_LIBS"

compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.github.florent37:glidepalette:1.0.6@aar'

compile 'com.jakewharton:butterknife:8.1.0'
apt 'com.jakewharton:butterknife-compiler:8.1.0'

compile 'com.google.android.apps.muzei:muzei-api:2.0'
compile 'com.makeramen:roundedimageview:2.2.1'

compile 'com.anjlab.android.iab.v3:library:1.0.32'
compile 'com.pluscubed:insets-dispatcher:0.1.3'

compile 'org.bitbucket.frankmonza:kustomapi:1.1'
}

带固定版本

dependencies {
compile 'com.android.support:support-v13:27.+'
compile 'com.android.support:palette-v7:27.+'
compile 'com.android.support:recyclerview-v7:27.+'
compile 'com.android.support:appcompat-v7:27.+'
compile 'com.android.support:cardview-v7:27.+'
compile 'com.android.support:design:27.+'
compile project(':licensing')

compile 'com.afollestad.material-dialogs:core:0.9.2.2'
compile 'com.afollestad:drag-select-recyclerview:0.3.6'
compile 'com.afollestad:bridge:3.2.5'
compile 'com.afollestad:sectioned-recyclerview:0.2.3'
compile 'com.afollestad:assent:0.2.5'
compile 'com.afollestad:icon-request:1.5.2'
compile 'com.afollestad:inquiry:4.1.2'

compile 'me.zhanghai.android.materialprogressbar:library:1.3.0'


compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.github.florent37:glidepalette:1.0.6@aar'

compile 'com.jakewharton:butterknife:8.1.0'
compile 'com.jakewharton:butterknife-compiler:8.1.0'

compile 'com.google.android.apps.muzei:muzei-api:2.0'
compile 'com.makeramen:roundedimageview:2.2.1'

compile 'com.anjlab.android.iab.v3:library:1.0.32'
compile 'com.pluscubed:insets-dispatcher:0.1.3'

compile 'org.bitbucket.frankmonza:kustomapi:1.1'
}

我不得不重新导入支持库并修复 1 个错字。刷新构建,你很高兴。

于 2018-07-01T08:32:25.950 回答