Commit 7e513ea3 by sikang

add bugly

parent 1470e3e5
...@@ -25,10 +25,18 @@ android { ...@@ -25,10 +25,18 @@ android {
disable 'GoogleAppIndexingWarning' disable 'GoogleAppIndexingWarning'
} }
productFlavors {
website {
dependencies {
implementation 'com.tencent.bugly:crashreport:3.0.0'
}
dimension "channel"
}
}
} }
dependencies { dependencies {
if ("${tongdun_parent_key}".size() > 5 ) { if ("${tongdun_parent_key}".size() > 5) {
implementation(name: 'android_spirit-20190220-2.0.0.1', ext: 'aar') implementation(name: 'android_spirit-20190220-2.0.0.1', ext: 'aar')
} }
......
...@@ -50,12 +50,13 @@ dependencies { ...@@ -50,12 +50,13 @@ dependencies {
testImplementation 'junit:junit:4.12' testImplementation 'junit:junit:4.12'
// multidex // multidex
api 'com.android.support:multidex:1.0.3' api 'com.android.support:multidex:1.0.3'
api 'com.android.support:multidex-instrumentation:1.0.3'
// 字符串资源替换 // 字符串资源替换
implementation 'com.jcminarro:Philology:1.0.1' implementation 'com.jcminarro:Philology:1.0.1'
implementation 'io.github.inflationx:viewpump:1.0.0' implementation 'io.github.inflationx:viewpump:1.0.0'
compileOnly 'com.tencent.bugly:crashreport:3.0.0'
//support包 //support包
//noinspection GradleCompatible //noinspection GradleCompatible
api "com.android.support:appcompat-v7:$rootProject.ext.supportLibraryVersion" api "com.android.support:appcompat-v7:$rootProject.ext.supportLibraryVersion"
......
...@@ -4,6 +4,7 @@ import android.app.Activity; ...@@ -4,6 +4,7 @@ import android.app.Activity;
import android.content.Context; import android.content.Context;
import android.content.res.Configuration; import android.content.res.Configuration;
import android.os.Bundle; import android.os.Bundle;
import android.support.multidex.MultiDex;
import android.support.multidex.MultiDexApplication; import android.support.multidex.MultiDexApplication;
import android.util.Log; import android.util.Log;
import android.view.Gravity; import android.view.Gravity;
...@@ -17,6 +18,7 @@ import com.jcminarro.philology.Philology; ...@@ -17,6 +18,7 @@ import com.jcminarro.philology.Philology;
import com.jcminarro.philology.PhilologyInterceptor; import com.jcminarro.philology.PhilologyInterceptor;
import com.jcminarro.philology.PhilologyRepository; import com.jcminarro.philology.PhilologyRepository;
import com.jcminarro.philology.PhilologyRepositoryFactory; import com.jcminarro.philology.PhilologyRepositoryFactory;
import com.tencent.bugly.crashreport.CrashReport;
import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable; import org.jetbrains.annotations.Nullable;
...@@ -37,6 +39,7 @@ public abstract class BaseApplication extends MultiDexApplication { ...@@ -37,6 +39,7 @@ public abstract class BaseApplication extends MultiDexApplication {
protected void attachBaseContext(Context base) { protected void attachBaseContext(Context base) {
initLibCnofig(); initLibCnofig();
super.attachBaseContext(AppLanguageUtils.attachBaseContext(base, LibConfig.LANGUAGE)); super.attachBaseContext(AppLanguageUtils.attachBaseContext(base, LibConfig.LANGUAGE));
MultiDex.install(this);
} }
...@@ -50,6 +53,8 @@ public abstract class BaseApplication extends MultiDexApplication { ...@@ -50,6 +53,8 @@ public abstract class BaseApplication extends MultiDexApplication {
@Override @Override
public void onCreate() { public void onCreate() {
super.onCreate(); super.onCreate();
CrashReport.initCrashReport(getApplicationContext(), "f35508ee93", true);
AppLanguageUtils.setLanguage(this, LibConfig.LANGUAGE); AppLanguageUtils.setLanguage(this, LibConfig.LANGUAGE);
PhilologyRepositoryFactory repositoryFactory = locale -> new DefaultPhilologyRepository(); PhilologyRepositoryFactory repositoryFactory = locale -> new DefaultPhilologyRepository();
...@@ -75,9 +80,6 @@ public abstract class BaseApplication extends MultiDexApplication { ...@@ -75,9 +80,6 @@ public abstract class BaseApplication extends MultiDexApplication {
@Override @Override
public CharSequence getText(@NotNull String key) { public CharSequence getText(@NotNull String key) {
try { try {
if("text_loan_amount".equals(key)){
Log.d("DefaultPhilology",key);
}
int resId = getResources().getIdentifier(key, "string", LibConfig.APPLICATION_ID); int resId = getResources().getIdentifier(key, "string", LibConfig.APPLICATION_ID);
return StringDecrypt.uncodeString(getResources().getString(resId)); return StringDecrypt.uncodeString(getResources().getString(resId));
} catch (Exception e) { } catch (Exception e) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment