BuglyDevTeam / Bugly-Android-Demo

Bugly Android SDK 使用例子
Apache License 2.0
812 stars 307 forks source link

两款app都使用了bugly,在同一个android机安装时出现两款app不兼容的情况 #86

Open chenxi-chenjia opened 6 years ago

chenxi-chenjia commented 6 years ago

app buid.gradle dependencies { compile project(':react-native-svg') compile project(':jcore-react-native') compile project(':jpush-react-native') compile fileTree(include: ['*.jar'], dir: 'libs') compile 'com.android.support:appcompat-v7:23.0.1' compile 'com.facebook.react:react-native:+' // From node_modules compile 'com.tencent.bugly:crashreport_upgrade:latest.release' compile 'com.tencent.bugly:nativecrashreport:latest.release' }

MainApplication public void onCreate() { super.onCreate(); SoLoader.init(this, / native exopackage / false); Bugly.init(getApplicationContext(), "***", false); }

AndroidManifest.xml <manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" package="com.stationappointmentapp">

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

<!--权限配置-->
<!--通知权限-->
<uses-permission android:name="android.permission.RECEIVE_WAP_PUSH"/>

<!--必须的权限配置-->
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<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" />
<uses-permission android:name="android.permission.READ_LOGS"
    tools:ignore="ProtectedPermissions" />
<!--保存资源到SD卡-->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<application
    android:name=".MainApplication"
    android:allowBackup="false"
    android:icon="@mipmap/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme">
    <activity
        android:name=".MainActivity"
        android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
        android:label="@string/app_name"
        android:windowSoftInputMode="adjustResize">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <!--必须配置-->
    <activity
        android:name="com.tencent.bugly.beta.ui.BetaActivity"
        android:configChanges="keyboardHidden|orientation|screenSize|locale"
        android:theme="@android:style/Theme.Translucent"/>

    <!-- 必须配置 fileProvider, 注意: android:authorities="${applicationId}.fileProvider" 不要直接copy,设置为你的包名.fileProvider-->
    <provider
        android:name="android.support.v4.content.FileProvider"
        android:authorities="com.bugly.upgrade.demo.fileProvider"
        android:exported="false"
        android:grantUriPermissions="true">
        <meta-data
            android:name="android.support.FILE_PROVIDER_PATHS"
            android:resource="@xml/provider_paths"/>

    </provider>

    <meta-data
        android:name="JPUSH_APPKEY"
        android:value="${JPUSH_APPKEY}" />
    <meta-data
        android:name="JPUSH_CHANNEL"
        android:value="${APP_CHANNEL}" />

    <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>

两款app写法均相同,只是AppId不同

请问这个问题是bugly的问题,无法解决还是可以配置解决的

g19980115 commented 6 years ago

看这句话<!-- 必须配置 fileProvider, 注意: android:authorities="${applicationId}.fileProvider" 不要直接copy,设置为你的包名.fileProvider-->