Witam, od paru dni uczę się javy i pisania prostych aplikacji w programie Android Studio. Wystąpił u mnie błąd, szukałem w internecie rozwiązań lecz żadne mi nie pomogło, Proszę o pomoc.
Podczas próby uruchomienia wyskakuje błąd:
Compilation failed; see the compiler error output for details.
Po rozwinięciu:
Executing tasks: [:app:assembleDebug]
:app:buildInfoDebugLoader
:app:checkDebugClasspath UP-TO-DATE
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:compileDebugAidl NO-SOURCE
:app:compileDebugRenderscript UP-TO-DATE
:app:checkDebugManifest UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:prepareLintJar UP-TO-DATE
:app:mainApkListPersistenceDebug UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:createDebugCompatibleScreenManifests UP-TO-DATE
:app:processDebugManifest
:app:splitsDiscoveryTaskDebug UP-TO-DATE
:app:processDebugResources
:app:generateDebugSources
:app:javaPreCompileDebug UP-TO-DATE
10 errors
:app:compileDebugJavaWithJavac FAILED
:app:buildInfoGeneratorDebug
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 1s
17 actionable tasks: 5 executed, 12 up-to-date
Kod:
MainActivity.java
package xlukin.test;
public void onCreate(Bundle savedInstanceState) {
public void onCrate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_uteliv);
TextView tidiTekst = (TextView) findViewById(R.id.tidiTekst);
tidiTekst.setVisibility(View.GONE);
Button tidiKnapp= (Button) findViewById(R.id.tidiKnapp);
tidiKnapp.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
tidiTekst.setVisibility(View.VISIBLE);
}
});
}
}
activity_main.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<EditText
android:id="@+id/tidiTekst"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="textPersonName"
android:text="Zostałem ujawniony!"
android:textSize="30sp"
android:textStyle="bold"
tools:layout_editor_absoluteX="16dp"
tools:layout_editor_absoluteY="59dp" />
<Button
android:id="@+id/tidiKnapp"
android:layout_width="239dp"
android:layout_height="79dp"
android:background="@android:color/holo_red_dark"
android:lineSpacingExtra="10sp"
android:text="Button"
android:textColor="@android:color/white"
android:textSize="30sp"
tools:layout_editor_absoluteX="73dp"
tools:layout_editor_absoluteY="216dp" />
</android.support.constraint.ConstraintLayout>
Proszę o wytłumaczenie dlaczego występuje ten błąd. Bardzo mi to pomoże, z góry dziękuje!