Repository navigation
Closed
Labels
Area: App RuntimeIssues in `libmonodroid.so`.vs-syncFor internal use only; creates a VSTS "mirror" issue.
Milestone
Description
Projects which enable proguard are crashing on startup when using d15-7. This is a regression as compared to d15-6.
This 'behavior' was previously reported as #1331, however the stack trace encountered in that instance was different than in this new failure. I've attached an .apk file as well as the intermediate output of that build.
Steps to Reproduce
- msbuild /t:Install /p:Configuration=Release /p:EnableProguard=true *.csproj
Version Information
Xamarin.Android SDK 8.3.0.1
Log File
03-06 14:14:38.374 30948 30948 E AndroidRuntime: java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{App29.App29/md5cccdd53e8348812fe1f2fce1387c090e.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "md5cccdd53e8348812fe1f2fce1387c090e.MainActivity" on path: DexPathList[[zip file "/data/app/App29.App29-eAar8WzCugsoi-6aT68DbA==/base.apk"],nativeLibraryDirectories=[/data/app/App29.App29-eAar8WzCugsoi-6aT68DbA==/lib/arm, /system/fake-libs, /data/app/App29.App29-eAar8WzCugsoi-6aT68DbA==/base.apk!/lib/armeabi-v7a, /system/lib]]
03-06 14:14:38.374 30948 30948 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2679)
03-06 14:14:38.374 30948 30948 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
03-06 14:14:38.374 30948 30948 E AndroidRuntime: at android.app.ActivityThread.-wrap11(Unknown Source:0)
03-06 14:14:38.374 30948 30948 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
03-06 14:14:38.374 30948 30948 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106)
03-06 14:14:38.374 30948 30948 E AndroidRuntime: at android.os.Looper.loop(Looper.java:164)
03-06 14:14:38.374 30948 30948 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6494)
03-06 14:14:38.374 30948 30948 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
03-06 14:14:38.374 30948 30948 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
03-06 14:14:38.374 30948 30948 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
03-06 14:14:38.374 30948 30948 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "md5cccdd53e8348812fe1f2fce1387c090e.MainActivity" on path: DexPathList[[zip file "/data/app/App29.App29-eAar8WzCugsoi-6aT68DbA==/base.apk"],nativeLibraryDirectories=[/data/app/App29.App29-eAar8WzCugsoi-6aT68DbA==/lib/arm, /system/fake-libs, /data/app/App29.App29-eAar8WzCugsoi-6aT68DbA==/base.apk!/lib/armeabi-v7a, /system/lib]]
03-06 14:14:38.374 30948 30948 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)
03-06 14:14:38.374 30948 30948 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
03-06 14:14:38.374 30948 30948 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
03-06 14:14:38.374 30948 30948 E AndroidRuntime: at android.app.Instrumentation.newActivity(Instrumentation.java:1174)
03-06 14:14:38.374 30948 30948 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2669)
03-06 14:14:38.374 30948 30948 E AndroidRuntime: ... 9 more
03-06 14:14:38.378 30948 30982 D libEGL : loaded /vendor/lib/egl/libGLESv1_CM_adreno.so
03-06 14:14:38.386 1163 10565 W ActivityManager: Force finishing activity App29.App29/md5cccdd53e8348812fe1f2fce1387c090e.MainActivity
03-06 14:14:38.388 1163 1178 I ActivityManager: Showing crash dialog for package App29.App29 u0
VS bug #578898
Metadata
Metadata
Assignees
Labels
Area: App RuntimeIssues in `libmonodroid.so`.vs-syncFor internal use only; creates a VSTS "mirror" issue.
Activity
atsushieno commentedon Mar 7, 2018
You forgot to attach the sources, those archives are both build artifacts.
atsushieno commentedon Mar 7, 2018
Also, the last time I touched Proguard task was like Oct. 2016. It's more about MSBuild tasks, so @dellis1972 and probably @jonathanpeppers (who made the last commit) would know what happened there. https://github.com/xamarin/xamarin-android/commits/master/src/Xamarin.Android.Build.Tasks/Tasks/Proguard.cs
pjcollins commentedon Mar 7, 2018
@atsushieno sorry for not including source, from what I have seen this reproduces with any project. Here's a simple demo that can be used:
https://github.com/xamarin/monodroid-samples/tree/master/Button
jonathanpeppers commentedon Mar 7, 2018
Hey guys, it looks like the same commits for the
<Proguard />MSBuild task are on 15.6: https://github.com/xamarin/xamarin-android/commits/d15-6/src/Xamarin.Android.Build.Tasks/Tasks/Proguard.csSo I guess it means the issue lies somewhere else? I will be coming back from parental leave part time on Monday, I can probably take a deeper look then if someone else hasn't yet.
jonathanpeppers commentedon Mar 12, 2018
This is indeed a fallout from #1131 -- something that was added for 15.7 right before I went on leave.
It looks like this for-loop needs changed, since
acw-map.txthas less lines: https://github.com/xamarin/xamarin-android/blob/89b524c2929c2e743c60038fa9623869cffa2505/src/Xamarin.Android.Build.Tasks/Tasks/Proguard.cs#L133[Xamarin.Android.Build.Tasks] update <Proguard /> task for latest acw…
[Xamarin.Android.Build.Tasks] update <Proguard /> task for latest acw…
[Xamarin.Android.Build.Tasks] Fix <Proguard /> w/ acw-map.txt (#1402)
[Xamarin.Android.Build.Tasks] Fix <Proguard /> w/ acw-map.txt (#1402)
pjcollins commentedon Mar 27, 2018
Verified fixed in XA 8.3.0.10.