Skip to content

Commit e4aa3e0

Browse files
author
80002462
committed
修复子项目引用的bug
1 parent 1b11ffa commit e4aa3e0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+519
-80
lines changed

android/app/build.gradle

+9-12
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ android {
3131
}
3232
}
3333

34-
//debug_tools {
35-
// database {
36-
// services {
37-
// path '/sdcard/services.db'
38-
// }
39-
// }
40-
//}
34+
debug_tools {
35+
database {
36+
services {
37+
path '/sdcard/services.db'
38+
}
39+
}
40+
}
4141

4242
dependencies {
4343
implementation fileTree(dir: 'libs', include: ['*.jar'])
@@ -47,7 +47,8 @@ dependencies {
4747
implementation 'com.android.support:appcompat-v7:26.1.0'
4848
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
4949
testImplementation 'junit:junit:4.12'
50-
implementation project(':debug_tools')
50+
debugImplementation 'io.lecon.debugtools:debugtools:1.0.8'
51+
// implementation project(':debug_tools')
5152
// implementation 'io.lecon.debugtools:debugtools:1.0.5'
5253
}
5354

@@ -56,9 +57,5 @@ debug_tools {
5657
services {
5758
path '/sdcard/services.db'
5859
}
59-
extra {
60-
path '/sdcard/.fxg_waybill_rule/waybill_rule.db'
61-
// password '"fengxiaoge123456"'
62-
}
6360
}
6461
}

android/app/src/main/java/io/lecon/unitedebugtoolsclient/MainActivity.java

+1-5
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,13 @@
1616
import java.util.List;
1717
import java.util.Map;
1818

19-
import io.lecon.debugtools.DebugTools;
20-
import io.lecon.debugtools.db.DbBean;
21-
import io.lecon.debugtools.db.DefaultDatabaseHelper;
19+
2220
import io.lecon.unitedebugtoolsclient.database.CarDBHelper;
2321
import io.lecon.unitedebugtoolsclient.database.ContactDBHelper;
2422
import io.lecon.unitedebugtoolsclient.database.ExtTestDBHelper;
2523

2624
public class MainActivity extends AppCompatActivity {
2725

28-
public static final String TAG = DebugTools.class.getSimpleName();
29-
3026
@Override
3127
protected void onCreate(Bundle savedInstanceState) {
3228
super.onCreate(savedInstanceState);

android/build.gradle

+5-3
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@
22

33
buildscript {
44
repositories {
5-
jcenter()
6-
google()
75
maven {
86
url 'file:plugin/repo'
97
}
8+
jcenter()
9+
google()
1010
}
1111
dependencies {
1212
classpath 'com.android.tools.build:gradle:3.1.4'
1313
classpath 'com.novoda:bintray-release:0.8.0'
14-
classpath 'io.lecon.debugtools.plugin:debugtoolsplugin:1.0.9.1'
14+
classpath 'io.lecon.debug_tools.plugin:debugtoolsplugin:1.0.0'
15+
// classpath 'io.lecon.debugtools.plugin:debugtoolsplugin:1.0.8'
16+
1517
// NOTE: Do not place your application dependencies here; they belong
1618
// in the individual module build.gradle files
1719
}

android/databaseviewer/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

android/databaseviewer/build.gradle

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
apply plugin: 'com.android.application'
2+
3+
android {
4+
compileSdkVersion 28
5+
6+
defaultConfig {
7+
applicationId 'io.lecon.databaseviewer'
8+
minSdkVersion 21
9+
targetSdkVersion 28
10+
versionCode 1
11+
versionName "1.0"
12+
13+
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
14+
15+
}
16+
17+
buildTypes {
18+
release {
19+
minifyEnabled false
20+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
21+
}
22+
}
23+
24+
}
25+
26+
dependencies {
27+
implementation fileTree(dir: 'libs', include: ['*.jar'])
28+
29+
implementation 'com.android.support:appcompat-v7:28.0.0'
30+
implementation 'com.android.support:support-v4:28.0.0'
31+
implementation 'com.android.support:design:28.0.0'
32+
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
33+
testImplementation 'junit:junit:4.12'
34+
androidTestImplementation 'com.android.support.test:runner:1.0.2'
35+
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
36+
}
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
package io.lecon.databaseviewer;
2+
3+
import android.content.Context;
4+
import android.support.test.InstrumentationRegistry;
5+
import android.support.test.runner.AndroidJUnit4;
6+
7+
import org.junit.Test;
8+
import org.junit.runner.RunWith;
9+
10+
import static org.junit.Assert.*;
11+
12+
/**
13+
* Instrumented test, which will execute on an Android device.
14+
*
15+
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
16+
*/
17+
@RunWith(AndroidJUnit4.class)
18+
public class ExampleInstrumentedTest {
19+
@Test
20+
public void useAppContext() {
21+
// Context of the app under test.
22+
Context appContext = InstrumentationRegistry.getTargetContext();
23+
24+
assertEquals("io.lecon.databaseviewer.test", appContext.getPackageName());
25+
}
26+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:tools="http://schemas.android.com/tools"
4+
package="io.lecon.databaseviewer">
5+
6+
<application
7+
android:allowBackup="true"
8+
android:icon="@mipmap/ic_launcher"
9+
android:label="@string/app_name"
10+
android:roundIcon="@mipmap/ic_launcher_round"
11+
android:supportsRtl="true"
12+
android:theme="@style/AppTheme"
13+
tools:ignore="GoogleAppIndexingWarning">
14+
15+
<activity
16+
android:name=".MainActivity"
17+
android:theme="@style/AppTheme.NoActionBar">
18+
<intent-filter>
19+
<action android:name="android.intent.action.MAIN" />
20+
21+
<category android:name="android.intent.category.LAUNCHER" />
22+
</intent-filter>
23+
</activity>
24+
</application>
25+
26+
</manifest>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
package io.lecon.databaseviewer
2+
3+
import android.os.Bundle
4+
import android.support.design.widget.FloatingActionButton
5+
import android.support.design.widget.Snackbar
6+
import android.view.View
7+
import android.support.design.widget.NavigationView
8+
import android.support.v4.view.GravityCompat
9+
import android.support.v4.widget.DrawerLayout
10+
import android.support.v7.app.ActionBarDrawerToggle
11+
import android.support.v7.app.AppCompatActivity
12+
import android.support.v7.widget.Toolbar
13+
import android.view.Menu
14+
import android.view.MenuItem
15+
16+
class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelectedListener {
17+
18+
override fun onCreate(savedInstanceState: Bundle?) {
19+
super.onCreate(savedInstanceState)
20+
setContentView(R.layout.activity_main)
21+
val toolbar = findViewById<View>(R.id.toolbar) as Toolbar
22+
setSupportActionBar(toolbar)
23+
24+
val fab = findViewById<View>(R.id.fab) as FloatingActionButton
25+
fab.setOnClickListener { view ->
26+
Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
27+
.setAction("Action", null).show()
28+
}
29+
30+
val drawer = findViewById<View>(R.id.drawer_layout) as DrawerLayout
31+
val toggle = ActionBarDrawerToggle(
32+
this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close)
33+
drawer.addDrawerListener(toggle)
34+
toggle.syncState()
35+
36+
val navigationView = findViewById<View>(R.id.nav_view) as NavigationView
37+
navigationView.setNavigationItemSelectedListener(this)
38+
}
39+
40+
override fun onBackPressed() {
41+
val drawer = findViewById<View>(R.id.drawer_layout) as DrawerLayout
42+
if (drawer.isDrawerOpen(GravityCompat.START)) {
43+
drawer.closeDrawer(GravityCompat.START)
44+
} else {
45+
super.onBackPressed()
46+
}
47+
}
48+
49+
override fun onCreateOptionsMenu(menu: Menu): Boolean {
50+
// Inflate the menu; this adds items to the action bar if it is present.
51+
menuInflater.inflate(R.menu.main, menu)
52+
return true
53+
}
54+
55+
override fun onOptionsItemSelected(item: MenuItem): Boolean {
56+
// Handle action bar item clicks here. The action bar will
57+
// automatically handle clicks on the Home/Up button, so long
58+
// as you specify a parent activity in AndroidManifest.xml.
59+
val id = item.itemId
60+
61+
62+
return if (id == R.id.action_settings) {
63+
true
64+
} else super.onOptionsItemSelected(item)
65+
66+
}
67+
68+
override fun onNavigationItemSelected(item: MenuItem): Boolean {
69+
// Handle navigation view item clicks here.
70+
val id = item.itemId
71+
72+
when (id) {
73+
R.id.nav_camera -> {
74+
// Handle the camera action
75+
}
76+
R.id.nav_gallery -> {
77+
78+
}
79+
R.id.nav_slideshow -> {
80+
81+
}
82+
R.id.nav_manage -> {
83+
84+
}
85+
R.id.nav_share -> {
86+
87+
}
88+
R.id.nav_send -> {
89+
90+
}
91+
}
92+
93+
val drawer = findViewById<View>(R.id.drawer_layout) as DrawerLayout
94+
drawer.closeDrawer(GravityCompat.START)
95+
return true
96+
}
97+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportWidth="24.0"
5+
android:viewportHeight="24.0">
6+
<path
7+
android:fillColor="#FF000000"
8+
android:pathData="M12,12m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0" />
9+
<path
10+
android:fillColor="#FF000000"
11+
android:pathData="M9,2L7.17,4H4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V6c0,-1.1 -0.9,-2 -2,-2h-3.17L15,2H9zm3,15c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5z" />
12+
</vector>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportWidth="24.0"
5+
android:viewportHeight="24.0">
6+
<path
7+
android:fillColor="#FF000000"
8+
android:pathData="M22,16V4c0,-1.1 -0.9,-2 -2,-2H8c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2zm-11,-4l2.03,2.71L16,11l4,5H8l3,-4zM2,6v14c0,1.1 0.9,2 2,2h14v-2H4V6H2z" />
9+
</vector>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportWidth="24.0"
5+
android:viewportHeight="24.0">
6+
<path
7+
android:fillColor="#FF000000"
8+
android:pathData="M22.7,19l-9.1,-9.1c0.9,-2.3 0.4,-5 -1.5,-6.9 -2,-2 -5,-2.4 -7.4,-1.3L9,6 6,9 1.6,4.7C0.4,7.1 0.9,10.1 2.9,12.1c1.9,1.9 4.6,2.4 6.9,1.5l9.1,9.1c0.4,0.4 1,0.4 1.4,0l2.3,-2.3c0.5,-0.4 0.5,-1.1 0.1,-1.4z" />
9+
</vector>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportWidth="24.0"
5+
android:viewportHeight="24.0">
6+
<path
7+
android:fillColor="#FF000000"
8+
android:pathData="M2.01,21L23,12 2.01,3 2,10l15,2 -15,2z" />
9+
</vector>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportWidth="24.0"
5+
android:viewportHeight="24.0">
6+
<path
7+
android:fillColor="#FF000000"
8+
android:pathData="M18,16.08c-0.76,0 -1.44,0.3 -1.96,0.77L8.91,12.7c0.05,-0.23 0.09,-0.46 0.09,-0.7s-0.04,-0.47 -0.09,-0.7l7.05,-4.11c0.54,0.5 1.25,0.81 2.04,0.81 1.66,0 3,-1.34 3,-3s-1.34,-3 -3,-3 -3,1.34 -3,3c0,0.24 0.04,0.47 0.09,0.7L8.04,9.81C7.5,9.31 6.79,9 6,9c-1.66,0 -3,1.34 -3,3s1.34,3 3,3c0.79,0 1.5,-0.31 2.04,-0.81l7.12,4.16c-0.05,0.21 -0.08,0.43 -0.08,0.65 0,1.61 1.31,2.92 2.92,2.92 1.61,0 2.92,-1.31 2.92,-2.92s-1.31,-2.92 -2.92,-2.92z" />
9+
</vector>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<vector xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:width="24dp"
3+
android:height="24dp"
4+
android:viewportWidth="24.0"
5+
android:viewportHeight="24.0">
6+
<path
7+
android:fillColor="#FF000000"
8+
android:pathData="M4,6H2v14c0,1.1 0.9,2 2,2h14v-2H4V6zm16,-4H8c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2V4c0,-1.1 -0.9,-2 -2,-2zm-8,12.5v-9l6,4.5 -6,4.5z" />
9+
</vector>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<shape xmlns:android="http://schemas.android.com/apk/res/android"
2+
android:shape="rectangle">
3+
<gradient
4+
android:angle="135"
5+
android:centerColor="#009688"
6+
android:endColor="#00695C"
7+
android:startColor="#4DB6AC"
8+
android:type="linear" />
9+
</shape>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
3+
xmlns:app="http://schemas.android.com/apk/res-auto"
4+
xmlns:tools="http://schemas.android.com/tools"
5+
android:id="@+id/drawer_layout"
6+
android:layout_width="match_parent"
7+
android:layout_height="match_parent"
8+
android:fitsSystemWindows="true"
9+
tools:openDrawer="start">
10+
11+
<include
12+
layout="@layout/app_bar_main"
13+
android:layout_width="match_parent"
14+
android:layout_height="match_parent" />
15+
16+
<android.support.design.widget.NavigationView
17+
android:id="@+id/nav_view"
18+
android:layout_width="wrap_content"
19+
android:layout_height="match_parent"
20+
android:layout_gravity="start"
21+
android:fitsSystemWindows="true"
22+
app:headerLayout="@layout/nav_header_main"
23+
app:menu="@menu/activity_main_drawer" />
24+
25+
</android.support.v4.widget.DrawerLayout>

0 commit comments

Comments
 (0)