错误: 错误,没有找到与给定名称相匹配的资源(在 "标签 "处,值为"@stringtitle_gizmos")。没有找到与给定名称相匹配的资源(在'label'处,值为'@stringtitle_gizmos')。

问题描述 投票:0回答:1

我是按照这个教程来的。https:/developer.android.comtrainingapp-linksdeep-link。但我不能让它工作。这是声明的清单

<?xml version="1.0" encoding="utf-8" standalone="no"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" android:compileSdkVersion="28" android:compileSdkVersionCodename="9" android:installLocation="auto" package="io.kodular.ontstudios.Deeplinks_Test" platformBuildVersionCode="28" platformBuildVersionName="9">
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
    <application android:debuggable="false" android:icon="@mipmap/ic_launcher" android:label="Deeplinks_Test" android:name="com.google.appinventor.components.runtime.multidex.MultiDexApplication" android:networkSecurityConfig="@xml/network_security_config" android:roundIcon="@mipmap/ic_launcher" android:supportsRtl="false" android:theme="@style/AppTheme" android:usesCleartextTraffic="true">
        <activity android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|screenSize|smallestScreenSize" android:name="io.kodular.ontstudios.Deeplinks_Test.Screen1" android:theme="@style/AppTheme.NoActionBar" android:windowSoftInputMode="stateHidden">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
            android:name="com.example.android.GizmosActivity"
        </activity>
        <activity
            android:name="com.example.android.GizmosActivity"
            android:label="@string/title_gizmos" >
            <intent-filter android:label="@string/filter_view_http_gizmos">
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <!-- Accepts URIs that begin with "http://www.example.com/gizmos” -->
                <data android:scheme="http"
                      android:host="www.example.com"
                      android:pathPrefix="/gizmos" />
                <!-- note that the leading "/" is required for pathPrefix-->
            </intent-filter>
            <intent-filter android:label="@string/filter_view_example_gizmos">
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <!-- Accepts URIs that begin with "example://gizmos” -->
                <data android:scheme="example"
                      android:host="gizmos" />
            </intent-filter>
        </activity>
        <meta-data android:name="io.kodular.app.VERSION" android:value="1.4C.4-Eagle"/>
        <provider android:authorities="io.kodular.ontstudios.Deeplinks_Test.provider" android:exported="false" android:grantUriPermissions="true" android:name="android.support.v4.content.FileProvider">
            <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/provider_paths"/>
        </provider>
        <uses-library android:name="org.apache.http.legacy" android:required="false"/>
        <meta-data android:name="Kodular_RCWTFYP-BYDNKHMWRIT-DNLATT" android:value="_d4705d7c44acc5bd4f7b41c83f38a3b7.d4705d7c44acc5bd4f7b41c83f38a3b7-1591708822~IHyiEtMYRvDgxXbt4rhOSnOCkopeFofjrENFozlMYAzosQQBVH5WqkA1OStZfxta_"/>
    </application>
</manifest>

而且,编译器显示:

I: Using Apktool 2.4.1
I: Copying C:\Users\ONT Studios\AppData\Local\Temp\apk-editor-studio\apk\{73264eb7-54f0-4471-a5b1-8e1585e25763} classes.dex file...
I: Copying C:\Users\ONT Studios\AppData\Local\Temp\apk-editor-studio\apk\{73264eb7-54f0-4471-a5b1-8e1585e25763} classes2.dex file...
I: Building resources...
W: fakeLogOpen(/dev/log_crash) failed
W: fakeLogOpen(/dev/log_stats) failed
W: fakeLogOpen(/dev/log_crash) failed
W: fakeLogOpen(/dev/log_stats) failed
W: fakeLogOpen(/dev/log_crash) failed
W: fakeLogOpen(/dev/log_stats) failed
W: C:\Users\ONT Studios\AppData\Local\Temp\apk-editor-studio\apk\{73264eb7-54f0-4471-a5b1-8e1585e25763}\AndroidManifest.xml:13: error: Error: No resource found that matches the given name (at 'label' with value '@string/title_gizmos').
W: 
W: C:\Users\ONT Studios\AppData\Local\Temp\apk-editor-studio\apk\{73264eb7-54f0-4471-a5b1-8e1585e25763}\AndroidManifest.xml:16: error: Error: No resource found that matches the given name (at 'label' with value '@string/filter_view_http_gizmos').
W: 
W: C:\Users\ONT Studios\AppData\Local\Temp\apk-editor-studio\apk\{73264eb7-54f0-4471-a5b1-8e1585e25763}\AndroidManifest.xml:26: error: Error: No resource found that matches the given name (at 'label' with value '@string/filter_view_example_gizmos').
W: 
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\ONTSTU~1\AppData\Local\Temp\brut_util_Jar_6559922005293012339.tmp, p, --forced-package-id, 127, --min-sdk-version, 19, --target-sdk-version, 28, --version-code, 1, --version-name, 1.0, --no-version-vectors, -F, C:\Users\ONTSTU~1\AppData\Local\Temp\APKTOOL4214939072774050782.tmp, -e, C:\Users\ONTSTU~1\AppData\Local\Temp\APKTOOL4459946816309254913.tmp, -0, arsc, -I, C:\Users\ONT Studios\AppData\Local\apk-editor-studio\frameworks\1.apk, -S, C:\Users\ONT Studios\AppData\Local\Temp\apk-editor-studio\apk\{73264eb7-54f0-4471-a5b1-8e1585e25763}\res, -M, C:\Users\ONT Studios\AppData\Local\Temp\apk-editor-studio\apk\{73264eb7-54f0-4471-a5b1-8e1585e25763}\AndroidManifest.xml]
Picked up _JAVA_OPTIONS: -Xmx1024m

对不起,如果这是个愚蠢的问题,这是我第一次编辑清单,我如何才能正确地添加深层链接? 谢谢!

android apk android-manifest deep-linking android-deep-link
1个回答
0
投票

在你的... strings.xml 文件,您是否在文件中添加了带键的字符串 title_gizmos? 如果没有你就得这样加。

<string name="title_gizmos">Gizmos</string>

更新的答案。

你可以找到 strings.xml/res/values/strings.xml 或使用双shift键盘快捷键打开搜索器搜索 strings.xml.

关于资源文件的更多信息 此处.

© www.soinside.com 2019 - 2024. All rights reserved.