Invalid variable name error in Android build.grade
NickName:ZhangKuixun Ask DateTime:2016-11-21T10:40:49

Invalid variable name error in Android build.grade

My code:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    } }

allprojects {
    repositories {
        jcenter()
    } }

task clean(type: Delete) {
    delete rootProject.buildDir }

Here the error log:

Error:(1, 0) Cause: startup failed: build file 'D:\Doctor\build.gradle': 1: Invalid variable name. Must start with a letter but was: . At [1:1] @ line 1, column 1. // Top-level build file where you can add configuration options common to all sub-projects/modules. ^

1 error

<a href="openFile:D:\Doctor\build.gradle">Open File</a>

Copyright Notice:Content Author:「ZhangKuixun」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/40711981/invalid-variable-name-error-in-android-build-grade

More about “Invalid variable name error in Android build.grade” related questions

Invalid variable name error in Android build.grade

My code: // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { jcenter() } dependencies {

Show Detail

Error:Cause: buildToolsVersion is not specified in build.grade (Project:xxx)

Right now I am trying to integrate Fabric with Crashlytics (https://docs.fabric.io/android/fabric/integration.html) into an existing android application. Following the integration instructions

Show Detail

Android NDK Error using Cygwin: ERROR: GNUMAKE variable is defined to an invalid name

I am trying to build a static library using Android NDK. For this I have installed Cygwin &amp; android-ndk-r7. To build the library I have already created the required source file and Android.mk...

Show Detail

Stata Error: Variable Name Invalid?

I'm sorry if this is basic but I can't seem to sort this error out. I'm trying to tabout specific questions in a survey. My code: qui: ds Q3_9-Q3_11b, has(type numeric) foreach i in `r(varlist)'...

Show Detail

Android Image Invalid File Name Error

I am simply trying to add an image to my android activity but I get the following error: res\drawable-hdpi\restLogo.png: Invalid file name: must contain only [a-z0-9_.] As you can see the error m...

Show Detail

Gradle settings: Invalid variable name. Must start with a letter but was:

Had a issue during settings of my android project: startup failed: settings file '/home/user/StudioProjects/project/android/settings.gradle': 1: Invalid variable name. Must start with a letter bu...

Show Detail

Failed to resolve: com.github.gabrielemariotti.cards:library:1.9. in Build.grade

Hey guys I'm trying to add the cards library for my android app by adding this line to my projects build.grade file: compile 'com.github.gabrielemariotti.cards:library:1.9.1' However when I re-sy...

Show Detail

Android error: Google play service version

I've this popular problem developing an android application with Eclipse: error: Error: No resource found that matches the given name (at 'value' with value '@integer/ google_play_services_versio...

Show Detail

Error: Invalid Resource directory name in Eclipse

I am creating a Sudoku Android app but I am getting a error under strings.xml. This is the line of code: &lt;?xml version="1.0" encoding="utf-8"?&gt; and this is the error: Invalid Resource directory

Show Detail

invalid variable name error on hadoop-functions.sh file on manjaro

when ı run this code hadoop version, ı get this error /usr/lib/hadoop-3.3.1/bin/../libexec/hadoop-functions.sh: line 2386: HADOOP_VERSİON_USER: invalid variable name /usr/lib/hadoop-3.3.1/bin/../li...

Show Detail