Tag Archives: Android learning

[Solved] Resource compilation failed (Failed to compile values resource file…

Resource compilation failed (Failed to compile values resource file /home/fanbin/AndroidStudioProjects/BookTest/app/build/intermediates/incremental/debug/mergeDebugResources/merged.dir/values/values.xml. ]


Resource registered by this uri is not recognized (Settings | Languages & Frameworks | Schemas and DTDs)

Reason: In color.xml, the color resource does not contain “#”, i.e. #FF000000, which causes this compilation error!

as shown in the figure below, the # number is not added to line 6.

Note: there are other situations that may cause this error. 

[Solved] Android12 Download Error: The application could not be installed: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED

Android12 install reports an error the application could not be installed: install_ PARSE_ FAILED_ MANIFEST_ MALFORMED

Solution:

For apps with Android12 as the adaptation platform, all four components that contain an intent-filter need to declare the android:exported attribute, and if the intent-filter contains LAUNCHER, it is best to declare it as android:exported= “true”

For example:

 <activity android:name=".MainActivity"
           android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
 </activity>

The four main components that use intent-filter can be viewed through the Merged Manifest in the manifest file

If you still get the error Installation failed due to: ‘-127’, try adding the following parameter to the manifest file

<permission-group android:name="${applicationId}.andpermission" />