1 # Could not find tools.jar. Please check that C:\Program Files\Java\jdk1.8.0_77\jre1.8 contains a valid JDK installation.
gradle需要tools.jar,最好是配置环境变量,将以下更改成所需,这样在运行gradle编译程序时就不会出问题。
JAVA_HOME =C:\Program Files\Java\jdk1.7.0_10classpath =.;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar
为了不更改环境变量,可以直接把JDK文件夹中的tools.jar复制到了jre\lib下。
2 #Caused by: org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:compileDebugJavaWithJavac'.
// 通过 Android Studio 的 Terminal 输入
gradlew compileDebugJavaWithJavac
3 #Schema export directory is not provided to the annotation processor so we cannot export the schema.
// 设置exportSchema = false
@Database(entities = {Alarm.class, AlarmRecord.class, Settings.class}, version = 1, exportSchema = false)
网友评论