错误:原因:无法使用哈希字符串'Google Inc.:Google API:23'查找目标:E:\ AndroidStudio\SDK

x10*_*ion 32 java android android-studio

我有上述错误,不知道为什么我还有它.我已经多次重新安装API 23并完成谷歌搜索,我找到的唯一修复是重新安装API但仍有问题.

有人有解决方法吗?

        apply plugin: 'com.android.application'

    android {
      compileSdkVersion 'Google Inc.:Google APIs:23'
      buildToolsVersion '23.0.2'

      defaultConfig {
        applicationId "com.example.app"
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
      }

      lintOptions {
        disable 'InvalidPackage'
      }


      buildTypes {
        release {
          minifyEnabled false
          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
      }
    }

    dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      testCompile 'junit:junit:4.12'
      compile 'com.android.support:appcompat-v7:23.1.1'
      compile 'com.android.support:design:23.1.1'
      compile 'me.neavo:volley:2014.12.09'
      compile 'com.google.code.gson:gson:2.5'
      compile 'com.jakewharton:butterknife:7.0.1'
      compile 'com.android.support:support-v4:23.1.1'
    }
Run Code Online (Sandbox Code Playgroud)

Vas*_*nov 72

尝试使用compileSdkVersion 23而不是compileSdkVersion 'Google Inc.:Google APIs:23'

  • 你复制这个字符串`compileSdkVersion 23`.您可以使用`compileSdkVersion'23'`(23个带撇号),这是不正确的. (3认同)
  • 啊翻转!金发如地狱时刻!感谢工厂的工作!奇怪的是,compileSdkVersion'Google Inc.:Google APIs:23'在我的Mac笔记本电脑上工作正常,我正在Windows PC上工作,并从GIT下载了与我的笔记本电脑工作相同的代码,但此处失败。再次感谢 (2认同)

win*_*lla 6

尝试在Windows上构建最初构建在Ubuntu上的项目时出现此错误.如果您不确定哪个build.gradle文件导致它并且项目有多个模块,请执行项目搜索"compileSdkVersion".

Windows期望: compileSdkVersion 'Google Apis:Google Apis:23'

Ubuntu期望: compileSdkVersion "Google Inc.:Google APIs:23"