解决冲突

This commit is contained in:
wds 2021-06-03 18:18:40 +08:00
commit c4c3184600
22 changed files with 168 additions and 52 deletions

35
.idea/jarRepositories.xml generated Normal file
View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="BintrayJCenter" />
<option name="name" value="BintrayJCenter" />
<option name="url" value="https://jcenter.bintray.com/" />
</remote-repository>
<remote-repository>
<option name="id" value="Google" />
<option name="name" value="Google" />
<option name="url" value="https://dl.google.com/dl/android/maven2/" />
</remote-repository>
<remote-repository>
<option name="id" value="maven" />
<option name="name" value="maven" />
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="maven" />
<option name="name" value="maven" />
<option name="url" value="https://jitpack.io" />
</remote-repository>
</component>
</project>

9
.idea/misc.xml generated Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project>

View File

@ -3,7 +3,7 @@ apply plugin: 'com.android.application'
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
// ndkVersion '23.0.7123448'
ndkVersion '23.0.7123448'
defaultConfig {
applicationId "com.navinfo.outdoor"
@ -27,7 +27,21 @@ android {
targetCompatibility JavaVersion.VERSION_1_8
}
}
//efs {
// //使
// isAutoTrack = true
// //Application的类名称Application
// applicationName = "UserApplication"
// //Activity的类名称Activity的类名按如下格式填写
// activityList = [
// "MainActivity",
// "WebActivity",
// "LoginActivity",
// "ImageShowActivity",
// "HomeActivity"
// //......
// ]
//}
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
@ -40,6 +54,9 @@ dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.umeng.umsdk:common:9.3.8'
implementation 'com.umeng.umsdk:asms:1.2.2'
implementation 'com.umeng.umsdk:apm:1.2.0'
//

View File

@ -1,26 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.navinfo.outdoor">
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />
<!-- <uses-sdk android:minSdkVersion="8"></uses-sdk>-->
<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_PHONE_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:name="com.navinfo.outdoor.api.UserApplication"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:networkSecurityConfig="@xml/network_security_config"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:name="com.navinfo.outdoor.api.UserApplication"
android:networkSecurityConfig="@xml/network_security_config"
android:theme="@style/AppTheme.NoActionBar">
<meta-data
android:name="design_width_in_dp"
android:value="480"/>
android:value="480" />
<meta-data
android:name="design_height_in_dp"
android:value="800"/>
android:value="800" />
<activity android:name="com.navinfo.outdoor.activity.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

View File

@ -24,6 +24,8 @@ public class MainActivity extends BaseActivity {
@Override
protected void initData() {
super.initData();
new CountDownTimer(3000, 1000) {
@Override
public void onTick(long l) {

View File

@ -9,6 +9,8 @@ import com.lzy.okgo.cookie.CookieJarImpl;
import com.lzy.okgo.cookie.store.DBCookieStore;
import com.lzy.okgo.interceptor.HttpLoggingInterceptor;
import com.lzy.okgo.model.HttpHeaders;
import com.umeng.commonsdk.UMConfigure;
import com.umeng.umcrash.UMCrash;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
@ -23,6 +25,15 @@ public class UserApplication extends Application {
public void onCreate() {
super.onCreate();
userApplication=this;
UMConfigure.init(this, "60b885bd6c421a3d97db55e6", "navinfo", UMConfigure.DEVICE_TYPE_PHONE, "");
/**
*设置组件化的Log开关
*参数: boolean 默认为false如需查看LOG设置为true
*/
UMConfigure.setLogEnabled(true);
String e ="测试自定义异常代码是否运行!!!!!!";
UMCrash.generateCustomLog(e,"UmengException");
initOkGo();
}
@ -66,6 +77,8 @@ public class UserApplication extends Application {
.addCommonHeaders(headers)
//全局统一超时重连次数默认为三次那么最差的情况会请求4次(一次原始请求三次重连请求)不需要可以设置为0;
.setRetryCount(0);
}
}

View File

@ -117,4 +117,5 @@ public abstract class BaseActivity extends AppCompatActivity {
}
}
}

View File

@ -20,6 +20,7 @@ import com.navinfo.outdoor.http.HttpInterface;
import com.navinfo.outdoor.http.OkGoBuilder;
import com.jcodecraeer.xrecyclerview.ProgressStyle;
import com.jcodecraeer.xrecyclerview.XRecyclerView;
import com.umeng.umcrash.UMCrash;
import org.json.JSONObject;
@ -108,6 +109,11 @@ public class CapacityEvaluationFragment extends BaseFragment implements View.OnC
dismissLoadingDialog();
Toast.makeText(getActivity(), e.getMessage(), Toast.LENGTH_SHORT).show();
Log.d("TAG", "onError: " + e.getMessage());
/**
* 友盟+
* 返回自定义报错信息
*/
UMCrash.generateCustomLog("网络请求报错-位置CapacityEvaluationFragment"+e.getMessage(),"UmengException");
}
}).build();
}

View File

@ -20,6 +20,7 @@ import com.navinfo.outdoor.bean.TaskExplainInfo;
import com.navinfo.outdoor.http.Callback;
import com.navinfo.outdoor.http.HttpInterface;
import com.navinfo.outdoor.http.OkGoBuilder;
import com.umeng.umcrash.UMCrash;
import org.json.JSONObject;
@ -73,6 +74,8 @@ public class IssueFragment extends BaseFragment implements View.OnClickListener
@Override
protected void initView() {
super.initView();
ivIssueFinish =findViewById(R.id.iv_issue_finish);
mainIssueRecycler =findViewById(R.id.main_issue_recycler);
ivIssueFinish.setOnClickListener(this::onClick);

View File

@ -17,7 +17,7 @@ import static android.app.Activity.RESULT_OK;
/**
* 实名认证
*/
public class UserAttestationFragment extends BaseFragment implements View.OnClickListener{
public class UserAttestationFragment extends BaseFragment implements View.OnClickListener {
private ImageView ivAttestation2;
private ImageView ivAttestation1;
@ -46,30 +46,31 @@ public class UserAttestationFragment extends BaseFragment implements View.OnClic
@Override
public void onClick(View v) {
switch (v.getId()){
switch (v.getId()) {
case R.id.iv_attestation:
getActivity().finish();
break;
case R.id.iv_attestation1:
Intent ivAttestation1 = new Intent("android.media.action.IMAGE_CAPTURE");
startActivityForResult(ivAttestation1,100);
startActivityForResult(ivAttestation1, 100);
break;
case R.id.iv_attestation2:
Intent ivAttestation2 = new Intent("android.media.action.IMAGE_CAPTURE");
startActivityForResult(ivAttestation2,200);
startActivityForResult(ivAttestation2, 200);
break;
}
}
@Override
public void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode==100&&resultCode==RESULT_OK){
Bundle extras=data.getExtras();//从Intent中获取附加值
Bitmap bitmap=(Bitmap) extras.get("data");//从附加值中获取返回的图像
if (requestCode == 100 && resultCode == RESULT_OK) {
Bundle extras = data.getExtras();//从Intent中获取附加值
Bitmap bitmap = (Bitmap) extras.get("data");//从附加值中获取返回的图像
ivAttestation1.setImageBitmap(bitmap);//显示图像
}else if (requestCode==200&&resultCode==RESULT_OK){
Bundle extras=data.getExtras();//从Intent中获取附加值
Bitmap bitmap=(Bitmap) extras.get("data");//从附加值中获取返回的图像
} else if (requestCode == 200 && resultCode == RESULT_OK) {
Bundle extras = data.getExtras();//从Intent中获取附加值
Bitmap bitmap = (Bitmap) extras.get("data");//从附加值中获取返回的图像
ivAttestation2.setImageBitmap(bitmap);//显示图像
}
}

View File

@ -6,6 +6,7 @@ import com.lzy.okgo.OkGo;
import com.lzy.okgo.model.HttpParams;
import com.lzy.okgo.model.Response;
import com.lzy.okgo.request.PostRequest;
import com.umeng.umcrash.UMCrash;
import org.json.JSONArray;
import org.json.JSONObject;
@ -195,6 +196,11 @@ public class OkGoBuilder<T> {
if (throwable != null) {
throwable.printStackTrace();
callback.onError(throwable, 2);
/**
* 友盟+
* 使用自定义错误查看时请在错误列表页面选择自定义异常
*/
UMCrash.generateCustomLog("网络请求报错-位置OKGOBuilder"+throwable,"UmengException");
}
}
});

View File

@ -1,5 +1,5 @@
<vector android:alpha="0.91" android:height="20dp"
android:tint="#919191" android:viewportHeight="24"
android:tint="#919191" android:viewportHeight="22"
android:viewportWidth="24" android:width="20dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M5.88,4.12L13.76,12l-7.88,7.88L8,22l10,-10L8,2z"/>
</vector>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="2dp"/>
<size android:width="200dp" android:height="50dp"/>
<stroke android:color="#F3E7C5" android:width="1dp"/>
</shape>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<size android:width="3dp" android:height="6dp"/>
<size android:width="1.5dp" android:height="3dp"/>
<solid android:color="@color/colorBack" />
</shape>

View File

@ -45,7 +45,7 @@
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:hint="ID/手机号"
android:hint=" ID/手机号"
android:paddingBottom="20dp"
android:textColorHint="@color/colorTransparent"
android:textCursorDrawable="@drawable/text_color"
@ -69,7 +69,7 @@
android:layout_width="300dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:hint="请输入密码"
android:hint=" 请输入密码"
android:paddingBottom="15dp"
android:textColorHint="@color/colorTransparent"
android:textCursorDrawable="@drawable/text_color"

View File

@ -1,16 +1,19 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="15dp"
android:orientation="vertical">
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="?android:attr/selectableItemBackground"
android:orientation="vertical"
android:paddingTop="15dp">
<TextView
android:id="@+id/tv_issue_title"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_height="30dp"
android:layout_marginLeft="15dp"
android:background="?android:attr/selectableItemBackground"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:textSize="16sp" />
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -1,15 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto">
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/rl_map_download"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#1BA5F1"
android:paddingTop="@dimen/top_pind_sp"
android:orientation="horizontal"
android:paddingTop="@dimen/top_pind_sp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
@ -20,13 +21,12 @@
android:layout_height="45dp"
android:layout_alignParentLeft="true"
android:layout_marginLeft="15dp"
android:src="@drawable/icon_arrow"
/>
android:src="@drawable/icon_arrow" />
<TextView
android:id="@+id/tv_download"
android:layout_width="wrap_content"
style="@style/text_style_toolbar_title"
android:layout_width="match_parent"
android:layout_toRightOf="@id/iv_find_task"
android:text="下载离线地图" />
</LinearLayout>
@ -65,6 +65,6 @@
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/linearLayout2" />
app:layout_constraintTop_toBottomOf="@+id/linearLayout2"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -159,7 +159,7 @@
android:drawableRight="@drawable/ic_baseline_arrow_forward"
android:gravity="center"
android:text="LV.1"
android:textSize="18sp" />
android:textSize="16sp" />
</RelativeLayout>
<View
@ -182,15 +182,16 @@
android:layout_alignParentLeft="true"
style="@style/main_text_style" />
<TextView
android:layout_width="60dp"
android:layout_height="30dp"
android:layout_width="45dp"
android:layout_height="20dp"
android:text="new"
android:gravity="center"
android:gravity="center_horizontal"
android:layout_centerVertical="true"
style="@style/main_outLogin_style"
android:layout_toLeftOf="@id/image_view"
/>
<ImageView
android:id="@+id/image_view"
android:layout_width="wrap_content"

View File

@ -17,8 +17,9 @@
<ImageView
android:id="@+id/iv_attestation"
android:layout_width="wrap_content"
android:layout_height="45dp"
android:layout_width="50dp"
android:layout_height="50dp"
android:padding="15dp"
android:layout_alignParentLeft="true"
android:layout_marginLeft="15dp"
android:src="@drawable/ic_baseline_arrow" />

View File

@ -17,12 +17,12 @@
<ImageView
android:id="@+id/iv_user"
android:layout_width="wrap_content"
android:layout_height="45dp"
android:layout_width="50dp"
android:layout_height="50dp"
android:padding="15dp"
android:layout_alignParentLeft="true"
android:layout_marginLeft="15dp"
android:src="@drawable/icon_arrow"
/>
android:src="@drawable/icon_arrow" />
<TextView
android:id="@+id/tv_user"
@ -74,18 +74,17 @@
style="@style/user_style"
android:layout_width="70dp"
android:layout_height="30dp"
android:layout_centerVertical="true"
android:layout_alignParentRight="true"
android:layout_marginRight="10dp"
android:text="去认证"
android:textColor="#fff" />
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#F1F0F0" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="0dp"
@ -112,7 +111,6 @@
android:layout_centerVertical="true"
/>
</RelativeLayout>
<View
android:layout_width="match_parent"
android:layout_height="1dp"

View File

@ -47,7 +47,7 @@
android:layout_width="match_parent"
android:layout_height="200dp"
android:layout_margin="20dp"
android:background="#fff"
android:background="@mipmap/white_bg"
app:layout_constraintEnd_toEndOf="@+id/linear_hint"
app:layout_constraintStart_toStartOf="@+id/linear_hint"
app:layout_constraintTop_toBottomOf="@+id/rl_withdraw">

View File

@ -4,13 +4,17 @@ buildscript {
google()
jcenter()
maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
maven { url 'https://repo1.maven.org/maven2/' }
}
dependencies {
classpath "com.android.tools.build:gradle:4.0.0"
}
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
@ -19,6 +23,7 @@ allprojects {
jcenter()
maven { url 'https://jitpack.io' }
maven{ url 'http://maven.aliyun.com/nexus/content/groups/public/'}
maven { url 'https://repo1.maven.org/maven2/' }
}
}