Zaczęłam swoją przygodę z pisaniem apek poprzez kurs na udemy.
Gdy zaczynam włączać bardzo prosty skrypt w sekcji build pokazuje się takie cos
Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:createMockableJar, :app:compileDebugAndroidTestSources, :app:compileDebugUnitTestSources, :app:compileDebugSources] in project C:\Users\Karolina\AndroidStudioProjects\MyApplicationgjfm
Task :app:preBuild UP-TO-DATE
Task :app:preDebugBuild UP-TO-DATE
Task :app:compileDebugAidl NO-SOURCE
Task :app:checkDebugManifest UP-TO-DATE
Task :app:generateDebugBuildConfig UP-TO-DATE
Task :app:compileDebugRenderscript NO-SOURCE
Task :app:prepareLintJar UP-TO-DATE
Task :app:prepareLintJarForPublish UP-TO-DATE
Task :app:generateDebugSources UP-TO-DATE
Task :app:preDebugAndroidTestBuild SKIPPED
Task :app:compileDebugAndroidTestAidl NO-SOURCE
Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
Task :app:mainApkListPersistenceDebug UP-TO-DATE
Task :app:createMockableJar UP-TO-DATE
Task :app:processDebugManifest UP-TO-DATE
Task :app:processDebugAndroidTestManifest UP-TO-DATE
Task :app:compileDebugAndroidTestRenderscript NO-SOURCE
Task :app:generateDebugAndroidTestBuildConfig UP-TO-DATE
Task :app:generateDebugAndroidTestSources UP-TO-DATE
Task :app:javaPreCompileDebug UP-TO-DATE
Task :app:generateDebugResValues UP-TO-DATE
Task :app:generateDebugResources UP-TO-DATE
Task :app:mergeDebugResources UP-TO-DATE
Task :app:processDebugResources UP-TO-DATE
Task :app:compileDebugJavaWithJavac FAILED
C:\Users\Karolina\AndroidStudioProjects\MyApplicationgjfm\app\src\main\java\com\example\myapplicationgjfm\noi.java:2: error: class, interface, or enum expected
}
^
1 error
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ‘:app:compileDebugJavaWithJavac’.
Compilation failed; see the compiler error output for details.
-
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. -
Get more help at https://help.gradle.org
BUILD FAILED in 10s
14 actionable tasks: 1 executed, 13 up-to-date
skrypt wygląda tak
package com.example.myapplicationgjfm;
public class HelloWorld {
public static void main(String[] args) {
System.out.println(“HelloWorld2”);
System.out.println(“My first java prograam”);
}
Nie wiem czy problem występuje przez złą konfigurację, nie mam pojęcia.
Z góry dziękuję