小编Kha*_*nea的帖子

API密钥配置android

在我的应用程序中,我将使用电影 DB API 来获取最受欢迎的电影海报。

请您帮助解决以下问题:

每次我尝试运行我的应用程序时都会收到这些错误

错误:(14, 77) 错误:预期

错误:(14, 53) 错误: ';' 预期的

错误:(14, 45) 错误:浮点文字格式错误

apply plugin: 'com.android.application'


  android {
compileSdkVersion 23
buildToolsVersion "23.0.2"

defaultConfig {
    applicationId "com.almaneakhaled.popularmoviesapp2"
    minSdkVersion 15
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }

    buildTypes.each {
        it.buildConfigField 'String', 'THE_MOVIE_DB', '967888xxxxxxxxx'
    }
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.android.support:support-v4:23.2.1'
 }
Run Code Online (Sandbox Code Playgroud)

这是我在 buildconfig.java 中收到错误的地方:

此处顶部有一行内容为“生成文件夹下的文件已生成,不应编辑”

 package com.almaneakhaled.popularmoviesapp2;

 public final …
Run Code Online (Sandbox Code Playgroud)

java api android themoviedb-api

1
推荐指数
1
解决办法
756
查看次数

标签 统计

android ×1

api ×1

java ×1

themoviedb-api ×1