Я установил Android Studio на Ubuntu 16.04 x 64. При запуске нового проекта я получаю неразрешенный «R» в setContentView(R.layout.activity_main);
. Также Gradle выход говорит:Ошибка AAPT бесконечное здание градиента
Configuration on demand is an incubating feature.
Incremental java compilation is an incubating feature.
:clean UP-TO-DATE
:app:clean
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:checkDebugManifest
:app:preReleaseBuild UP-TO-DATE
:app:prepareComAndroidSupportAnimatedVectorDrawable2400Library
:app:prepareComAndroidSupportAppcompatV72400Library
:app:prepareComAndroidSupportSupportV42400Library
:app:prepareComAndroidSupportSupportVectorDrawable2400Library
:app:prepareDebugDependencies
:app:compileDebugAidl
:app:compileDebugRenderscript
:app:generateDebugBuildConfig
:app:mergeDebugShaders
:app:compileDebugShaders
:app:generateDebugAssets
:app:mergeDebugAssets
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources
:app:mergeDebugResources
AAPT err(Facade for 31820177): /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: 5: /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: Syntax error: end of file unexpected (expecting ")")
AAPT err(Facade for 10308796): /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: 5: /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: Syntax error: end of file unexpected (expecting ")")
AAPT err(Facade for 25000613): /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: 5: /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: Syntax error: end of file unexpected (expecting ")")
AAPT err(Facade for 14460031): /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: 5: /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: Syntax error: end of file unexpected (expecting ")")
AAPT err(Facade for 4374283): /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: 5: /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: Syntax error: end of file unexpected (expecting ")")
AAPT err(Facade for 5504361): /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: 5: /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: Syntax error: end of file unexpected (expecting ")")
AAPT err(Facade for 26854796): /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: 5: /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: Syntax error: end of file unexpected (expecting ")")
AAPT err(Facade for 10516242): /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: 5: /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: Syntax error: end of file unexpected (expecting ")")
AAPT err(Facade for 32324093): /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: 5: /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: Syntax error: end of file unexpected (expecting ")")
AAPT err(Facade for 27711675): /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: 5: /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: Syntax error: end of file unexpected (expecting ")")
AAPT err(Facade for 30103954): /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: 5: /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: Syntax error: end of file unexpected (expecting ")")
AAPT err(Facade for 18064832): /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: 5: /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: Syntax error: end of file unexpected (expecting ")")
AAPT err(Facade for 24392487): /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: 5: /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: Syntax error: end of file unexpected (expecting ")")
AAPT err(Facade for 26834549): /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: 5: /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: Syntax error: end of file unexpected (expecting ")")
AAPT err(Facade for 193005): /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: 5: /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: Syntax error: end of file unexpected (expecting ")")
AAPT err(Facade for 22524866): /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: 5: /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: Syntax error: end of file unexpected (expecting ")")
AAPT err(Facade for 30685476): /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: 5: /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: Syntax error: end of file unexpected (expecting ")")
AAPT err(Facade for 11160077): /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: 5: /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: Syntax error: end of file unexpected (expecting ")")
AAPT err(Facade for 23466321): /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: 5: /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: Syntax error: end of file unexpected (expecting ")")
AAPT err(Facade for 29924546): /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: 5: /home/nllsdfx/Downloads/build-tools/24.0.0/aapt: Syntax error: end of file unexpected (expecting ")")
Exception in thread "png-cruncher_3" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at /home/nllsdfx/Downloads/build-tools/24.0.0/aapt can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:110)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_1" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at /home/nllsdfx/Downloads/build-tools/24.0.0/aapt can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:110)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_4" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at /home/nllsdfx/Downloads/build-tools/24.0.0/aapt can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:110)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_2" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at /home/nllsdfx/Downloads/build-tools/24.0.0/aapt can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:110)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_5" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at /home/nllsdfx/Downloads/build-tools/24.0.0/aapt can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:110)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_6" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at /home/nllsdfx/Downloads/build-tools/24.0.0/aapt can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:110)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
at java.lang.Thread.run(Thread.java:745)
Exception in thread "png-cruncher_10" java.lang.RuntimeException: Timed out while waiting for slave aapt process, make sure the aapt execute at /home/nllsdfx/Downloads/build-tools/24.0.0/aapt can run successfully (some anti-virus may block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a value bigger than 5 seconds
at com.android.builder.png.AaptProcess.waitForReady(AaptProcess.java:108)
at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:110)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:203)
at java.lang.Thread.run(Thread.java:745)
Я попытался сделать:
- Переустановка студии и SDK
- Заменить SDk после установки
- Set SLAVE_AAPT_TIMEOUT 30 секунд
- Первый ответ от this тема
- Включить автономную работу (инструменты для сборки инструментов)
Несомненно, ничего не изменилось. Мне действительно нужна помощь.
Я вижу, что вы не пробовали компилироваться с другой версией инструментов SDK/build. v24 по-прежнему совершенно новый –
@ cricket_007 Я сделал некоторые попытки с v23, а позже получил v24, поэтому нет – nllsdfx