Status Update
Comments
[Deleted User] <[Deleted User]> #2
can you share your android studio version
[Deleted User] <[Deleted User]> #3
Is this happening with Studio 3.0?
uc...@google.com <uc...@google.com>
im...@google.com <im...@google.com> #4
Note: This worked for me on Windows 7 Pro 32-bit (with Android Studio 2.3.3). Seems like an issue with adt-branding module (which should contain the "/idea/AndroidStudioApplicationInfo.xml" resource).
[Deleted User] <[Deleted User]> #5
Hi, also happened on Mac Book Pro 15 retina mi-2015
MacOs Sierra 10.12.6
Android Studio 2.3.3
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)
MacOs Sierra 10.12.6
Android Studio 2.3.3
java version "1.8.0_51"
Java(TM) SE Runtime Environment (build 1.8.0_51-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.51-b03, mixed mode)
im...@google.com <im...@google.com> #6
Thank you for this feedback. Your feedback helps make sure Android development tools are great! Given your issues has been resolved I am closing this issue.
[Deleted User] <[Deleted User]> #7
Sounds great!
az...@lyft.com <az...@lyft.com> #8
@im…@google.com , can you please give a link to the patch/diff that fixed the problem? We're seeing same/similar issue with aapt2 and Buck https://github.com/facebook/buck/issues/1667
Thanks!
Thanks!
im...@google.com <im...@google.com> #9
@8 The fix was in AAPT2 - please use the newest build tools (27.0.2 if I'm not mistaken) and it will contain that fix.
Description
AI-171.4163606, JRE 1.8.0_152-release-884-b01x64 JetBrains s.r.o, OS Mac OS X(x86_64) v10.12.4 unknown, screens 1440x900, 1920x1080, 1080x1920; Retina
tl;dr steps to reproduce:
Create a fresh Android project with the Canary 6 Android Studio and run it against a Nexus 4 AVD at API level 16 (info below). A ResourceNotFoundException will be thrown (stack trace below). Running against a Nexus 5 AVD at API level 25 will run successfully with the expected results.
Gory details
I started writing an Android Kotlin app from scratch after going through all the Kotlin koans and going through the book, _Kotlin for Android Developers_. Initially I was using Android Studio 3.0 Canary 5 and I was running against a Nexus 4 AVD at API level 16. Things had been going smoothly and then I upgraded to Canary 6, which in turn meant that I needed to upgrade the Gradle plugin to 3.0.0-alpha6.
After these upgrades, I started seeing a ResourceNotFoundException when calling super.onCreate() in the sole Activity in the project. I was fairly certain that I had tested the current version and it had run fine, but to make sure I did a few "git checkouts' to earlier versions and got the same result. I then tried doing a "Clean Project' (no luck) and an "Invalidate Cache and Restart" (no luck). I then tried a git clone into a fresh directory, but again no luck.
I tried running under the debugger but did not have the source for the class in which the resource id was being determined and for some reason could not download it. I looked in the R.java file for the resource id and it was assigned to `abc_vector_test` in `public static final class drawable`.
I looked for a way to downgrade to Canary 5 but didn't find anything so then I tried running under Android Studio 2.3.3 but gave up because I kept needing to fix one problem or another and it felt like it was going to be more work than I wanted to put into it.
I then tried running on a Nexus 5 AVD at API level 25 and it did not throw any exceptions and ran successfully. I then went back to the Nexus 4 AVD at API 16 and it crashed as before.
I then created a fresh Android project that included Kotlin support and when I ran that against the API 16 AVD it crashed with a ResourceNotFoundException (but a different resource id). When I run this same project against a Nexus 5 AVD at API 25 it runs as expected.
Stack traces and emulator info
****** Stack trace from fresh project ******
07-12 10:56:41.671 2865-2865/? E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.bartonstanley.testforcanary6/com.bartonstanley.testforcanary6.MainActivity}: android.content.res.Resources$NotFoundException: Resource ID #0x7f060052
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
at android.app.ActivityThread.access$600(ActivityThread.java:130)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f060052
at android.content.res.Resources.getValue(Resources.java:1013)
at android.support.v7.widget.AppCompatDrawableManager.loadDrawableFromDelegates(AppCompatDrawableManager.java:330)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:195)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:188)
at android.support.v7.widget.AppCompatDrawableManager.checkVectorDrawableSetup(AppCompatDrawableManager.java:755)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:193)
at android.support.v7.widget.TintTypedArray.getDrawableIfKnown(TintTypedArray.java:88)
at android.support.v7.app.AppCompatDelegateImplBase.<init>(AppCompatDelegateImplBase.java:128)
at android.support.v7.app.AppCompatDelegateImplV9.<init>(AppCompatDelegateImplV9.java:149)
at android.support.v7.app.AppCompatDelegateImplV11.<init>(AppCompatDelegateImplV11.java:29)
at android.support.v7.app.AppCompatDelegateImplV14.<init>(AppCompatDelegateImplV14.java:54)
at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:202)
at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:183)
at android.support.v7.app.AppCompatActivity.getDelegate(AppCompatActivity.java:520)
at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:71)
at com.bartonstanley.testforcanary6.MainActivity.onCreate(MainActivity.kt:9)
at android.app.Activity.performCreate(Activity.java:5008)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
at android.app.ActivityThread.access$600(ActivityThread.java:130)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
****** Stack trace from in-progress project ******
07-12 08:18:47.842 13073-13073/? E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.bartonstanley.tododoingdone/com.bartonstanley.tododoingdone.views.root.RootActivity}: android.content.res.Resources$NotFoundException: Resource ID #0x7f070058
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
at android.app.ActivityThread.access$600(ActivityThread.java:130)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f070058
at android.content.res.Resources.getValue(Resources.java:1013)
at android.support.v7.widget.AppCompatDrawableManager.loadDrawableFromDelegates(AppCompatDrawableManager.java:330)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:195)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:188)
at android.support.v7.widget.AppCompatDrawableManager.checkVectorDrawableSetup(AppCompatDrawableManager.java:755)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:193)
at android.support.v7.widget.TintTypedArray.getDrawableIfKnown(TintTypedArray.java:88)
at android.support.v7.app.AppCompatDelegateImplBase.<init>(AppCompatDelegateImplBase.java:128)
at android.support.v7.app.AppCompatDelegateImplV9.<init>(AppCompatDelegateImplV9.java:149)
at android.support.v7.app.AppCompatDelegateImplV11.<init>(AppCompatDelegateImplV11.java:29)
at android.support.v7.app.AppCompatDelegateImplV14.<init>(AppCompatDelegateImplV14.java:54)
at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:202)
at android.support.v7.app.AppCompatDelegate.create(AppCompatDelegate.java:183)
at android.support.v7.app.AppCompatActivity.getDelegate(AppCompatActivity.java:520)
at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:71)
at com.bartonstanley.tododoingdone.views.root.RootActivity.onCreate(RootActivity.kt:24)
at android.app.Activity.performCreate(Activity.java:5008)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
at android.app.ActivityThread.access$600(ActivityThread.java:130)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
***** Nexus 4 API level 16 emulator info ******
Emulator ADB serial number
emulator-5554
Android version
4.1 (Jelly Bean) - API 16 (Rev 5)
Emulator version
26.1.2-4077558
Latest available emulator version
26.1.2-4077558 (Stable update channel)
Android SDK tools version
26.0.2
Host CPU Model
2.5 GHz Intel Core i7
Device name
All of view details
Name: Nexus_4_API_16
CPU/ABI: Google APIs Intel Atom (x86)
Path: /Users/bstanley/.android/avd/Nexus_4_API_16.avd
Target: google_apis [Google APIs] (API level 16)
Skin: nexus_4
SD Card: 100M
hw.dPad: no
hw.lcd.height: 1280
runtime.network.speed: full
hw.accelerometer: yes
vm.heapSize: 80
skin.dynamic: yes
hw.device.manufacturer: Google
hw.lcd.width: 768
hw.gps: yes
hw.initialOrientation: Portrait
image.androidVersion.api: 16
hw.audioInput: yes
image.sysdir.1: system-images/android-16/google_apis/x86/
showDeviceFrame: yes
hw.camera.back: emulated
hw.mainKeys: no
AvdId: Nexus_4_API_16
hw.camera.front: emulated
hw.lcd.density: 320
avd.inidisplayname: Nexus 4 API 16
hw.gpu.mode: auto
hw.device.hash2: MD5:cd87b62509afda15361db744f4aa1ec0
hw.ramSize: 1536
hw.trackBall: no
PlayStore.enabled: false
hw.battery: yes
hw.cpu.ncore: 4
hw.sdCard: no
tag.display: Google APIs
runtime.network.latency: none
hw.keyboard: no
hw.sensors.proximity: yes
disk.dataPartition.size: 800M
hw.sensors.orientation: yes
avd.ini.encoding: UTF-8
hw.gpu.enabled: yes
****** Gradle info ******
Gradle version
4.1
Android Plugin Version
3.0.0-alpha6
Module Compile Sdk Version
API 26: Android 8.0 (O)
Module Build Tools Version
25.0.3
Android SDK Tools version
26.0.2