mirror of
https://github.com/github/codeql.git
synced 2026-02-21 01:13:43 +01:00
They were all failing for me like: [autobuild] /home/ian/code/dev/target/codeql-java-integration-tests/ql/java/ql/integration-tests/all-platforms/java/android-sample-old-style-no-wrapper/project/src/main/AndroidManifest.xml:5: Error: Main must extend android.app.Activity [Instantiatable] [autobuild] <activity android:name="Main" android:exported="true"> [autobuild] ~~~~ [autobuild] Explanation for issues of type "Instantiatable": [autobuild] Activities, services, broadcast receivers etc. registered in the manifest [autobuild] file (or for custom views, in a layout file) must be "instantiatable" by [autobuild] the system, which means that the class must be public, it must have an [autobuild] empty public constructor, and if it's an inner class, it must be a static [autobuild] inner class. I'm not sure why it works on CI but not locally, but either way this works around the issue.
The difference between these old-style Android tests and those without the old-style suffix is that the old-style tests use com.android.tools.build in their top-level build script as shown in the example at https://developer.android.com/studio/build/#top-level before February 2022, whereas the new-style tests only refer to com.android.application and com.android.library as shown in the updated examples published in February 2022.