I am getting these errors:
Error:resource drawable/abc_ic_ab_back_mtrl_am_alpha (aka com.instacoin:drawable/abc_ic_ab_back_mtrl_am_alpha) not found.
Error:failed linking file resources.
Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:Execution failed for task ':app:processDebugResources'. Failed to execute aapt
This is my AndroidManifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.instacoin"
android:versionCode="11"
android:versionName="7.3" >
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="23" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<uses-permission android:name="android.permission.GET_TASKS" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<!-- Below is optional -->
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
<permission
android:name="com.instacoin.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:largeHeap="true"
android:theme="@style/AppTheme"
android:name="com.instacoin.MyApplication"
android:windowSoftInputMode="stateAlwaysHidden">
<activity android:name="com.chartboost.sdk.CBImpressionActivity"
android:excludeFromRecents="true"
android:hardwareAccelerated="true"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen"
android:configChanges="keyboardHidden|orientation|screenSize" />
<meta-data android:name="applovin.sdk.key"
android:value="@string/applovin_sdk_key" />
<meta-data android:name="com.revmob.app.id" android:value="@string/revmob_media_id"/>
<activity android:name="com.revmob.FullscreenActivity"
android:theme="@android:style/Theme.Translucent"
android:configChanges="keyboardHidden|orientation">
</activity>
<activity android:name="com.applovin.adview.AppLovinInterstitialActivity" />
<activity android:name="com.applovin.adview.AppLovinConfirmationActivity" />
<activity
android:name="com.instacoin.ActivitySplashScreen"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="com.instacoin.ActivityLogin"
android:label="@string/title_screen_sign_in"
android:theme="@style/AppTheme"
android:windowSoftInputMode="stateAlwaysHidden" >
</activity>
<activity
android:name="com.instacoin.ActivityRegister"
android:label="@string/title_screen_sign_up"
android:screenOrientation="portrait"
android:theme="@style/AppTheme"
android:windowSoftInputMode="stateAlwaysHidden" >
</activity>
<activity
android:name="com.instacoin.ActivityMainWallet"
android:clearTaskOnLaunch="true"
android:label="@string/app_name"
android:launchMode="singleTask"
android:screenOrientation="portrait"
android:theme="@style/AppTheme"
android:windowSoftInputMode="stateAlwaysHidden" >
</activity>
<!-- <activity
android:name="com.facebook.LoginActivity"
android:theme="@style/AppTheme"/>-->
<activity android:name="com.facebook.FacebookActivity"
android:theme="@android:style/Theme.Translucent.NoTitleBar"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="@string/app_name"
tools:replace="android:theme" />
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="@string/sdk_facebook_app_id" />
<receiver
android:name="com.google.android.gcm.GCMBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.sensiblewallet" />
</intent-filter>
</receiver>
<receiver android:name="com.instacoin.NotificationReciver" />
<service android:name="com.instacoin.GCMIntentService" />
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<!-- appgrade -->
<activity
android:name="com.appgrade.sdk.view.InterstitialActivity"
android:theme="@style/InterstitialDialogTheme"/>
<!-- supersonicads -->
<activity
android:name="com.supersonicads.sdk.controller.ControllerActivity"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true" />
<activity
android:name="com.supersonicads.sdk.controller.InterstitialActivity"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:theme="@android:style/Theme.Translucent" />
<activity
android:name="com.supersonicads.sdk.controller.OpenUrlActivity"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:theme="@android:style/Theme.Translucent" />
<!-- TrialPay's activities -->
<activity
android:name="com.trialpay.android.views.webcontainer.WebContainerActivity"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|uiMode|touchscreen|screenSize"
android:hardwareAccelerated="true"
android:theme="@android:style/Theme.NoTitleBar"
android:windowSoftInputMode="adjustResize" >
</activity>
<activity
android:name="com.trialpay.android.views.webcontainer.WebContainerPopupActivity"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|uiMode|touchscreen|screenSize"
android:hardwareAccelerated="true"
android:theme="@android:style/Theme.Translucent.NoTitleBar" >
</activity>
<activity
android:name="com.trialpay.android.views.videocontainer.VideoContainerActivity"
android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|uiMode|touchscreen|screenSize"
android:hardwareAccelerated="true"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
</activity>
<!-- persona -->
<activity android:name="ly.persona.sdk.OffersActivity" />
<!-- Tapjoy -->
<activity
android:name="com.tapjoy.TJAdUnitActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:hardwareAccelerated="true"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<activity
android:name="com.tapjoy.mraid.view.ActionHandler"
android:configChanges="orientation|keyboardHidden|screenSize" />
<activity
android:name="com.tapjoy.mraid.view.Browser"
android:configChanges="orientation|keyboardHidden|screenSize" />
<!-- nativex -->
<activity
android:name="com.nativex.monetization.activities.InterstitialActivity"
android:configChanges="orientation|screenSize"
android:hardwareAccelerated="true"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<activity
android:name="com.nativex.videoplayer.VideoActivity"
android:configChanges="orientation|screenSize" />
<!-- required Activity to show Superrewards video ads -->
<activity
android:name="com.playerize.superrewards.activities.SRWebViewActivity"
android:screenOrientation="portrait" />
<!-- required Activity to show AdscendMedia video ads -->
<activity
android:name="com.adscendmedia.sdk.ui.OffersActivity"
android:configChanges="orientation|screenSize" >
</activity>
<!-- required Activity to show Adcolony video ads -->
<activity
android:name="com.jirbo.adcolony.AdColonyOverlay"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
<activity
android:name="com.jirbo.adcolony.AdColonyFullscreen"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" />
<activity
android:name="com.jirbo.adcolony.AdColonyBrowser"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.Black.NoTitleBar.Fullscreen" />
<!-- required Activity to show Vungle video ads -->
<activity
android:name="com.vungle.publisher.FullScreenAdActivity"
android:configChanges="keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />
<activity
android:name="net.adxmi.android.AdBrowser"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:theme="@android:style/Theme.Light.NoTitleBar" >
</activity>
<service
android:name="net.adxmi.android.AdService"
android:exported="false" >
</service>
<!-- Component that rewarded ADs needs -->
<service
android:name="net.adxmi.android.ExpService"
android:exported="false" >
</service>
<!-- Optional Component -->
<receiver
android:name="net.adxmi.android.AdReceiver" >
<intent-filter>
<action android:name="android.intent.action.PACKAGE_ADDED" />
<data android:scheme="package" />
</intent-filter>
</receiver>
<activity android:name="com.heyzap.sdk.ads.HeyzapInterstitialActivity" android:configChanges="keyboardHidden|orientation|screenSize|smallestScreenSize" />
<activity android:name="com.heyzap.sdk.ads.HeyzapVideoActivity" android:configChanges="keyboardHidden|orientation|screenSize|smallestScreenSize" />
<activity android:name="com.heyzap.sdk.ads.HeyzapProxyActivity" />
<activity android:name="com.heyzap.sdk.ads.VASTActivity" android:configChanges="keyboardHidden|orientation|screenSize|smallestScreenSize" />
<activity android:name="com.heyzap.sdk.ads.MediationTestActivity" />
<receiver android:name="com.heyzap.sdk.ads.PackageAddedReceiver">
<intent-filter>
<data android:scheme="package"/>
<action android:name="android.intent.action.PACKAGE_ADDED"/>
</intent-filter>
</receiver>
</application>
i was searching for exactly this error in a few threads and would like anyone who experiences a situation like this to do these steps:
android studio is throwing errors like @drawable/... not found
even renaming files does not solve the problem
Analyse
-> inspect code ...
it takes some time but its worth it and now ...now if this still does not work here are the stranges things ive seen:
android studio is doing an incremental build , so files are proccessed and used again if they weren't changed. this leads to the following behaviour:
running an build -> collecting files -> proccessing files -> an error occured
all other files in the queue arent found as the couldn't get proccessed by build step
the following error is shown as the last error occured aka @drawable not found
Looks like the file res/layout/earn_credits_list_item.xml is trying to reference a drawable that is not present. This resource used to exist in support library < 23.2.0 (and briefly in 23.2.1), but was renamed to abc_ic_ab_back_material in 23.2.0 and in 24.0.0 onward.
If you're using support library > 24.0.0 (which you probably are) rename abc_ic_ab_back_mtrl_am_alpha to abc_ic_ab_back_material.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With