Reputation: 99
I put a background image in drawable folder and use it in background activity.
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context=".MainActivity$PlaceholderFragment"
android:background="@drawable/background"
>
Every time I run the project, I get the following error:
C:\ASP\InstaFollowerPlus\app\src\main\res\layout\fragment_main.xml Error:(21, 29) No resource found that matches the given name (at 'background' with value '@drawable/background'). Error:Execution failed for task ':app:processDebugResources'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'E:\Software\Computer engineer software\Android SDK full\sdk\build-tools\22.0.1\aapt.exe'' finished with non-zero exit value 1.
i tried Clean Project and failed.
compileSdkVersion 23, buildToolsVersion '22.0.1', Android Studio: 1.2.1.1
Upvotes: 0
Views: 1336
Reputation: 1
If you use android:id="@+id/imageViewLogoTangan"
to define imageID
, then use the same (@+id/imageViewLogoTangan
) in your another code
Upvotes: 0
Reputation: 75788
No resource found that matches the given name (at 'background' with value '@drawable/background').
use compileSdkVersion 23, buildToolsVersion '23.0.1',
Post your build.gradle please . Remove unwanted (Duplicate) File
use Android Studio: 1.3 (Stable Version)
Then Clean and build project And Sync Project
Check your images are properly .PNG formatted or not
Upvotes: 3
Reputation: 2534
Rename
the Image via right clicking on it and selecting the Refactor>Rename
. And then run it it might run.
Upvotes: 0