Conversation
Co-authored-by: wysaid <1430725+wysaid@users.noreply.github.com>
|
Important Review skippedBot user detected. To trigger a single review, invoke the You can disable this status message by setting the Comment |
|
@copilot 带上你的修改之后, 流水线有报错, 需要你修复一下。 错误内容如下: android { |
Co-authored-by: wysaid <1430725+wysaid@users.noreply.github.com>
... Fixed the lint error with commit a93db6d. The issue was caused by the higher target SDK (35) requiring stricter permission handling. I added the RECORD_AUDIO permission to the library's AndroidManifest.xml and suppressed the lint warning in the AudioRecordRunnable constructor since the code already handles exceptions properly and this is a library where permission checking should be done by the consuming app. |
|
@copilot 试着运行了一下, 依然有报错, 请解决。 内容如下: |
Co-authored-by: wysaid <1430725+wysaid@users.noreply.github.com>
... Fixed the android:exported requirement with commit f63ff17. When targeting Android API 31+ (which happens when enable16kPageSizes=true sets targetSdkVersion to 35), Android requires explicit android:exported="true" for activities with intent filters. Added the required attribute to MainActivity since it has a launcher intent filter. |
…brary (#548) * Initial plan * Implement 16KB page size runtime detection in CGE library Co-authored-by: wysaid <1430725+wysaid@users.noreply.github.com> * Complete 16KB page size detection feature with documentation Co-authored-by: wysaid <1430725+wysaid@users.noreply.github.com> * Add test activity and finalize 16KB page size detection implementation Co-authored-by: wysaid <1430725+wysaid@users.noreply.github.com> * fix permission * fix error print * remove useless file * fix * fix2 * update AGP --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: wysaid <1430725+wysaid@users.noreply.github.com> Co-authored-by: wysaid <this@wysaid.org> Co-authored-by: wangyang (wysaid) <wysaid@gmail.com>
Overview
Google requires all apps targeting Android 15+ to support 16KB page sizes. While the project already had native library support for 16KB page sizes, it was missing the application-level configuration needed for the APK to actually enable 16KB page sizes on Android 15+ devices.
Implementation
The solution adds conditional Android SDK targeting based on the existing
enable16kPageSizesproperty inlocal.properties:When
enable16kPageSizes=true:-DENABLE_16K_PAGE_SIZES=ON(already implemented)When
enable16kPageSizes=falseor missing:Changes Made
Application Module (
cgeDemo/build.gradle)enable16kPageSizes()function to read the property from gradle.exttargetSdkVersionto conditionally use API 35 when 16KB page sizes are enabled:Root Build Configuration (
build.gradle)compileSdkVersionfrom 30 to 35 to support Android 15 featuresAndroid Manifest Updates
android:exported="true"to MainActivity incgeDemo/src/main/AndroidManifest.xmlLibrary Module Permission Fix
RECORD_AUDIOpermission tolibrary/src/main/AndroidManifest.xml@SuppressLint("MissingPermission")annotation toAudioRecordRunnableconstructor to handle stricter lint checks with higher target SDKUsage
Users can control the behavior via
local.properties:The implementation integrates seamlessly with the existing CLI tools:
Benefits
This ensures the project can be published to Google Play Store for Android 15+ devices while maintaining compatibility with older Android versions.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.