Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Use Markdown for this comment
Set severity, which reflects how much the issue affects the use of the product
Change issue status back to 'Assigned'
Pending code changes (auto-populated)
[ID: 84651]
Select items in the list
[ID: 558956]
[ID: 874707]
Set the version(s) of the product affected by this issue (comma-separated list)
Set the version(s) of the product in which the issue should be fixed (comma-separated list)
Set the version(s) of the product in which the issue fix was verified (comma-separated list)
Set if this issue occurs in production
[ID: 85206]
Set Reporter
Set Type
Set priority, which reflects how soon the issue should be fixed
Set Status
Set Assignee
Set Verifier
Remove item
View or edit staffing
View issue level access limits(Press Alt + Right arrow for more information)
Description
#1AI-171.4182969, JRE 1.8.0_152-release-884-b01x64 JetBrains s.r.o, OS Windows 7(amd64) v6.1 Service Pack 1, screens 2560x1440
Since building my app with Android Studio 3, the resulting APK causes some Android system crashes at native level on certain devices. It is hardly to debug, crash happens in system code.
backtrace:
native: pc 0000000000029158 /system/lib/libc.so (dlfree+1239)
native: pc 000000000000f3c3 /system/lib/libc.so (free+10)
native: pc 0000000000012ab5 /system/lib/libandroidfw.so (android::ResStringPool::uninit()+38)
native: pc 00000000000137ef /system/lib/libandroidfw.so (android::ResXMLTree::uninit()+12)
native: pc 000000000001380d /system/lib/libandroidfw.so (android::ResXMLTree::~ResXMLTree()+4)
native: pc 0000000000010507 /system/lib/libandroidfw.so (android::AssetManager::getPkgName(char const*)+258)
native: pc 0000000000010569 /system/lib/libandroidfw.so (android::AssetManager::getBasePackageName(unsigned int)+68)
native: pc 0000000000081e9f /system/lib/libandroid_runtime.so
native: pc 000000000027b17b /data/dalvik-cache/arm/system@framework@boot.oat
This backtrace is identical on all affected devices. It may be related to how Gradle tools build resources or manifest. It wakes some sleeping dragon!
Most affected devices (from crash reports provided by Google developer console):
Galaxy S3 Neo Plus (s3ve3g)
Nexus 4 (mako)
Galaxy Grand duos (baffin)
Galaxy S3 (d2att)
Galaxy S2 (GT-I9100)
Galaxy Nexus (maguro)
Nexus 7 (2012) (grouper)
Iconia Tab A211 (picasso_e2)
and many other
I have one device myself where I can reproduce the crash. That is Samsung Galaxy Nexus I9250 (maguro) with Cyanogenmod 12.1 ROM. Both debug and release versions crash the device. The device gets to reboot loop. I can recover device by adb shell and pm uninstall command to uninstall the app.
I confirm that my app previously build using Gradle 2.x plugin doesn't crash system that way. It started exactly with Gradle 3.x plugin.
Attached are 2 versions of my app, one built with Gradle 2.x and not crashing, other build with 3.x and crashing.
You may need to find affected device to reproduce it, but I gave enough hints.
Expect that more developers will produce same affected APKs with Android Studio 3 when it's out of beta, so it's worth fixing build tools.