1. Questions

1.1. Q1: This version of Android Studio is incompatible with the Gradle Plugin used. Try disabling Instant Run(or updating either the IDE or the Gradle plugin to the latest version)

Android Studio > Preferences > Build,Execution,Deployment > Instant Run > 取消勾选所有

1.2. Q2: com.android.server.job.controllers.JobStatus.getUid()-->NullPointerException

https://issuetracker.google.com/issues/37018640 Android 系统 Bug。

解决方法:

Change:
    public boolean onStartJob(JobParameters params) {
        Log.i(TAG, "ON START JOB: " + params.getJobId());
        jobFinished(params, false);
        return false;
    }

to :
public boolean onStartJob(JobParameters params) {
        Log.i(TAG, "ON START JOB: " + params.getJobId());
        return false;
    }

or:
public boolean onStartJob(JobParameters params) {
        Log.i(TAG, "ON START JOB: " + params.getJobId());
        jobFinished(params, false);
        return true;
    }

1.3. Q3: Fatal Exception: java.lang.IllegalArgumentException: pointerIndex out of range

1.4. Q4: A problem occurred starting process 'command 'node'

因为没找到 /usr/local/bin/node,所以手动创建

$ command -v node
/Users/bell/.nvm/versions/node/v8.9.1/bin/node
$ ln -s /Users/bell/.nvm/versions/node/v8.9.1/bin/node /usr/local/bin/node

1.5. Q5: gradle sync failed caused: java.lang.NullPointerException

File -> Invalidate Caches / Restart -> Invalidate and Restart Build -> Clean Project

results matching ""

    No results matching ""