私は最新のAndroid Studio 2.1.1です。私は簡単な電卓を作ろうとしています。しかし、何らかの理由で解決できない方法がたくさんある、これは本当に奇妙な問題です。重要なファイルを壊さないように、すべてのコードをコピーして、新しい新しいプロジェクトに貼り付けました。でも、まだエラーがあります。Android Studioを再インストールする必要がありますか? what my project looks likeエラー:方法を解決できません
は、ここに私のメッセージです:
Information:Gradle tasks [:app:assembleDebug]
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:mergeDebugShaders UP-TO-DATE
:app:compileDebugShaders UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:incrementalDebugJavaCompilationSafeguard UP-TO-DATE
:app:compileDebugJavaWithJavac
:app:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
C:\Users\Home\AndroidStudioProjects\CalcuterTest\app\src\main\java\com\kingjulian\www\calcutertest\MainActivity.java
:app:compileDebugJavaWithJavac FAILED
Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
Information:BUILD FAILED
Information:Total time: 1.612 secs
Information:30 errors
Information:0 warnings
Information:See complete output in console
と私のGradleコンソール:
Executing tasks: [:app:assembleDebug]
Configuration on demand is an incubating feature.
Incremental java compilation is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:prepareDebugDependencies
:app:compileDebugAidl UP-TO-DATE
:app:compileDebugRenderscript UP-TO-DATE
:app:generateDebugBuildConfig UP-TO-DATE
:app:mergeDebugShaders UP-TO-DATE
:app:compileDebugShaders UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources UP-TO-DATE
:app:processDebugManifest UP-TO-DATE
:app:processDebugResources UP-TO-DATE
:app:generateDebugSources UP-TO-DATE
:app:incrementalDebugJavaCompilationSafeguard UP-TO-DATE
:app:compileDebugJavaWithJavac
:app:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
C:\Users\Home\AndroidStudioProjects\CalcuterTest\app\src\main\java\com\kingjulian\www\calcutertest\MainActivity.java:26: error: cannot find symbol
super.onCreate(savedInstanceState);
^
symbol: method onCreate(Bundle)
C:\Users\Home\AndroidStudioProjects\CalcuterTest\app\src\main\java\com\kingjulian\www\calcutertest\MainActivity.java:27: error: cannot find symbol
setContentView(R.layout.activity_main);
^
symbol: method setContentView(int)
location: class MainActivity
C:\Users\Home\AndroidStudioProjects\CalcuterTest\app\src\main\java\com\kingjulian\www\calcutertest\MainActivity.java:24: error: method does not override or implement a method from a supertype
@Override
^
C:\Users\Home\AndroidStudioProjects\CalcuterTest\app\src\main\java\com\kingjulian\www\calcutertest\MainActivity.java:32: error: cannot find symbol
one = (Button) findViewById(R.id.one);
^
symbol: method findViewById(int)
location: class MainActivity
C:\Users\Home\AndroidStudioProjects\CalcuterTest\app\src\main\java\com\kingjulian\www\calcutertest\MainActivity.java:33: error: cannot find symbol
two = (Button) findViewById(R.id.two);
^
^
symbol: method findViewById(int)
location: class MainActivity
C:\Users\Home\AndroidStudioProjects\CalcuterTest\app\src\main\java\com\kingjulian\www\calcutertest\MainActivity.java:51: error: cannot find symbol
answer = (TextView) findViewById(R.id.answer);
^
symbol: method findViewById(int)
location: class MainActivity
23 errors
:app:compileDebugJavaWithJavac FAILED
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.
BUILD FAILED
Total time: 1.411 secs
それでした!ありがとうございました! – Julian5234
問題が解決してうれしいです。 :) –