【问题标题】:React Native apk installed but not showing in menuReact Native apk 已安装但未显示在菜单中
【发布时间】:2019-03-01 12:26:47
【问题描述】:

我在尝试在 android 上安装签名版本时遇到了一些问题。我可以安装我的 .apk,我可以在 Settings -> Applications -> Installed 中找到我的应用程序,但它没有与其他应用程序一起显示。另外,在安装结束时,我无法点击OPEN 按钮。

我可以使用react-native run-android 毫无问题地启动应用程序。

我在这里放下我的manifest.xml

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.area">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.GET_ACCOUNTS"/>
<uses-permission android:name="android.permission.USE_CREDENTIALS"/>

<application
  android:name=".MainApplication"
  android:label="@string/app_name"
  android:icon="@mipmap/ic_launcher"
  android:allowBackup="false"
  android:theme="@style/AppTheme">
  <activity
    android:name=".MainActivity"
    android:launchMode="singleTask"
    android:screenOrientation="portrait"
    android:label="@string/app_name"
    android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
    android:windowSoftInputMode="adjustPan">
    <intent-filter>
        <action android:name="android.intent.action.MAIN"/>
        <category android:name="android.intent.category.LAUNCHER" />
        <data android:scheme="com.area" android:host="oauth"/>
    </intent-filter>
  </activity>
  <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>

</manifest>

我通过删除清单中的第二个 &lt;activity /&gt; 标记找到了可能的解决方案,但在我的情况下它不起作用..

提前感谢您的帮助!

【问题讨论】:

    标签: android react-native build invisible


    【解决方案1】:

            <data android:scheme="com.area" android:host="oauth"/>
    
    

    在另一个像这样的意图过滤器中

        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
        <intent-filter>
    
            <data android:scheme="com.area" android:host="oauth"/>
        </intent-filter>
    
    
    
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-11-01
      • 1970-01-01
      • 2019-02-15
      • 1970-01-01
      • 1970-01-01
      • 2010-11-29
      相关资源
      最近更新 更多