Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/go/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用gomobile构建的android应用程序的启动图标未显示_Android_Go_Gomobile - Fatal编程技术网

使用gomobile构建的android应用程序的启动图标未显示

使用gomobile构建的android应用程序的启动图标未显示,android,go,gomobile,Android,Go,Gomobile,我有一个用围棋写的网络应用程序。由于Go 1.5,我也可以使用gomobile为android设备构建它,几乎没有任何更改 但我无法更改应用程序的默认android图标 我正在使用自定义清单文件构建应用程序: <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="name.app" android:i

我有一个用围棋写的网络应用程序。由于Go 1.5,我也可以使用gomobile为android设备构建它,几乎没有任何更改

但我无法更改应用程序的默认android图标

我正在使用自定义清单文件构建应用程序:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="name.app" android:installLocation="auto"
 android:versionCode="1" android:versionName="1.0-alpha">
    <uses-sdk android:minSdkVersion="9" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" android:maxSdkVersion="18" />

    <application android:label="name.app" android:debuggable="true" android:icon="@assets/ic_launcher" android:persistent="true">
        <activity android:name="org.golang.app.GoNativeActivity" android:configChanges="orientation|keyboardHidden"
         android:alwaysRetainTaskState="true" android:launchMode="singleTask">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            <meta-data android:name="android.app.lib_name" android:value="name.app" />
        </activity>
    </application>
</manifest>
除了
android:icon=“@assets/ic\u launcher”
之外,我还尝试了
android:icon=“@drawable/ic\u launcher”
android:icon=“@assets/drawable/ic\u launcher”
,但没有任何结果

有解决办法吗


注意:gomobile只有资产目录作为自定义文件的存放位置。

您是否尝试创建
res
文件夹并将可绘图文件夹放在其中?是的,但gomobile忽略它,不将其添加到apk。还尝试了路径
资产/res/drawable-*/
。这个问题有答案吗@sisoft你试过把它们放在
mipmap
文件夹中吗?@Topo:也不行。正如我发现的,添加了图标支持,但是这个补丁集还没有出现在主git树中。
.
├── *.go
├── AndroidManifest.xml
└── assets
    ├── drawable-hdpi
    │   └── ic_launcher.png
    ├── drawable-mdpi
    │   └── ic_launcher.png
    ├── drawable-xhdpi
    │   └── ic_launcher.png
    ├── drawable-xxhdpi
    │   └── ic_launcher.png
    ├── drawable-xxxhdpi
    │   └── ic_launcher.png
    └── ic_launcher.png