雷云 5 роки тому
коміт
5d3c349889
84 змінених файлів з 26273 додано та 0 видалено
  1. +14
    -0
      .gitignore
  2. +122
    -0
      .idea/codeStyles/Project.xml
  3. +5
    -0
      .idea/codeStyles/codeStyleConfig.xml
  4. +21
    -0
      .idea/gradle.xml
  5. +7
    -0
      .idea/inspectionProfiles/Project_Default.xml
  6. +9
    -0
      .idea/misc.xml
  7. +6
    -0
      .idea/render.experimental.xml
  8. +12
    -0
      .idea/runConfigurations.xml
  9. +3
    -0
      README.MD
  10. +1
    -0
      app/.gitignore
  11. +80
    -0
      app/build.gradle
  12. BIN
      app/libs/wenote.jar
  13. +21
    -0
      app/proguard-rules.pro
  14. +24
    -0
      app/src/androidTest/java/com/yzx/webebook/ExampleInstrumentedTest.kt
  15. +53
    -0
      app/src/main/AndroidManifest.xml
  16. +12
    -0
      app/src/main/java/com/yzx/webebook/App.kt
  17. +90
    -0
      app/src/main/java/com/yzx/webebook/MainActivity.kt
  18. +1060
    -0
      app/src/main/java/com/yzx/webebook/activity/BookActivity.java
  19. +273
    -0
      app/src/main/java/com/yzx/webebook/activity/WebActivity.kt
  20. +73
    -0
      app/src/main/java/com/yzx/webebook/activity/base/BaseActivity.kt
  21. +13
    -0
      app/src/main/java/com/yzx/webebook/model/UploadBean.kt
  22. +19
    -0
      app/src/main/java/com/yzx/webebook/presenter/base/BasePresenter.kt
  23. +12
    -0
      app/src/main/java/com/yzx/webebook/presenter/base/IView.kt
  24. +2
    -0
      app/src/main/java/com/yzx/webebook/utils/KotlinX.kt
  25. +15
    -0
      app/src/main/java/com/yzx/webebook/utils/YzxFileProvider.kt
  26. +22
    -0
      app/src/main/java/com/yzx/webebook/widget/EBookView.java
  27. +32
    -0
      app/src/main/java/com/yzx/webebook/widget/ScrollTextView.kt
  28. +1
    -0
      app/src/main/jniLibs/armeabi/libpaintworker.so
  29. +34
    -0
      app/src/main/res/drawable-v24/ic_launcher_foreground.xml
  30. +29
    -0
      app/src/main/res/drawable-v24/progress_horizontal.xml
  31. BIN
      app/src/main/res/drawable/Thumbs.db
  32. BIN
      app/src/main/res/drawable/background0.png
  33. BIN
      app/src/main/res/drawable/background1.png
  34. BIN
      app/src/main/res/drawable/background10.png
  35. BIN
      app/src/main/res/drawable/background11.jpg
  36. BIN
      app/src/main/res/drawable/background2.png
  37. BIN
      app/src/main/res/drawable/background3.png
  38. BIN
      app/src/main/res/drawable/background4.png
  39. BIN
      app/src/main/res/drawable/background5.png
  40. BIN
      app/src/main/res/drawable/background6.png
  41. BIN
      app/src/main/res/drawable/background7.png
  42. BIN
      app/src/main/res/drawable/background8.png
  43. BIN
      app/src/main/res/drawable/background9.png
  44. +5
    -0
      app/src/main/res/drawable/btn_select.xml
  45. +74
    -0
      app/src/main/res/drawable/ic_launcher_background.xml
  46. BIN
      app/src/main/res/drawable/ic_note_page_left_normal.png
  47. BIN
      app/src/main/res/drawable/ic_note_page_right_normal.png
  48. +29
    -0
      app/src/main/res/drawable/progress_horizontal.xml
  49. +235
    -0
      app/src/main/res/layout/activity_book.xml
  50. +98
    -0
      app/src/main/res/layout/activity_main.xml
  51. +76
    -0
      app/src/main/res/layout/activity_web.xml
  52. +5
    -0
      app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
  53. +5
    -0
      app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
  54. BIN
      app/src/main/res/mipmap-hdpi/ic_launcher.png
  55. BIN
      app/src/main/res/mipmap-hdpi/ic_launcher_round.png
  56. BIN
      app/src/main/res/mipmap-mdpi/ic_launcher.png
  57. BIN
      app/src/main/res/mipmap-mdpi/ic_launcher_round.png
  58. BIN
      app/src/main/res/mipmap-xhdpi/ic_back_def.png
  59. BIN
      app/src/main/res/mipmap-xhdpi/ic_close.png
  60. BIN
      app/src/main/res/mipmap-xhdpi/ic_launcher.png
  61. BIN
      app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
  62. BIN
      app/src/main/res/mipmap-xhdpi/ic_left.png
  63. BIN
      app/src/main/res/mipmap-xhdpi/ic_refresh.png
  64. BIN
      app/src/main/res/mipmap-xhdpi/ic_right.png
  65. BIN
      app/src/main/res/mipmap-xxhdpi/ic_launcher.png
  66. BIN
      app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
  67. BIN
      app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
  68. BIN
      app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
  69. +25
    -0
      app/src/main/res/values/colors.xml
  70. +42
    -0
      app/src/main/res/values/dimens.xml
  71. +3
    -0
      app/src/main/res/values/strings.xml
  72. +12
    -0
      app/src/main/res/values/styles.xml
  73. +8
    -0
      app/src/main/res/xml/provider_paths.xml
  74. +17
    -0
      app/src/test/java/com/yzx/webebook/ExampleUnitTest.kt
  75. +29
    -0
      build.gradle
  76. +32
    -0
      gradle.properties
  77. BIN
      gradle/wrapper/gradle-wrapper.jar
  78. +6
    -0
      gradle/wrapper/gradle-wrapper.properties
  79. +172
    -0
      gradlew
  80. +84
    -0
      gradlew.bat
  81. +390
    -0
      hs_err_pid15488.log
  82. +22859
    -0
      replay_pid15488.log
  83. +2
    -0
      settings.gradle
  84. BIN
      yzx.jks

+ 14
- 0
.gitignore Переглянути файл

@@ -0,0 +1,14 @@
*.iml
.gradle
/local.properties
/.idea/caches
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
.DS_Store
/build
/captures
.externalNativeBuild
.cxx

+ 122
- 0
.idea/codeStyles/Project.xml Переглянути файл

@@ -0,0 +1,122 @@
<component name="ProjectCodeStyleConfiguration">
<code_scheme name="Project" version="173">
<JetCodeStyleSettings>
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</JetCodeStyleSettings>
<codeStyleSettings language="XML">
<indentOptions>
<option name="CONTINUATION_INDENT_SIZE" value="4" />
</indentOptions>
<arrangement>
<rules>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:android</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>xmlns:.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:id</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*:name</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>name</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>style</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>^$</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>http://schemas.android.com/apk/res/android</XML_NAMESPACE>
</AND>
</match>
<order>ANDROID_ATTRIBUTE_ORDER</order>
</rule>
</section>
<section>
<rule>
<match>
<AND>
<NAME>.*</NAME>
<XML_ATTRIBUTE />
<XML_NAMESPACE>.*</XML_NAMESPACE>
</AND>
</match>
<order>BY_NAME</order>
</rule>
</section>
</rules>
</arrangement>
</codeStyleSettings>
<codeStyleSettings language="kotlin">
<option name="CODE_STYLE_DEFAULTS" value="KOTLIN_OFFICIAL" />
</codeStyleSettings>
</code_scheme>
</component>

+ 5
- 0
.idea/codeStyles/codeStyleConfig.xml Переглянути файл

@@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="USE_PER_PROJECT_SETTINGS" value="true" />
</state>
</component>

+ 21
- 0
.idea/gradle.xml Переглянути файл

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GradleMigrationSettings" migrationVersion="1" />
<component name="GradleSettings">
<option name="linkedExternalProjectsSettings">
<GradleProjectSettings>
<option name="delegatedBuild" value="true" />
<option name="testRunner" value="PLATFORM" />
<option name="distributionType" value="DEFAULT_WRAPPED" />
<option name="externalProjectPath" value="$PROJECT_DIR$" />
<option name="modules">
<set>
<option value="$PROJECT_DIR$" />
<option value="$PROJECT_DIR$/app" />
</set>
</option>
<option name="resolveModulePerSourceSet" value="false" />
</GradleProjectSettings>
</option>
</component>
</project>

+ 7
- 0
.idea/inspectionProfiles/Project_Default.xml Переглянути файл

@@ -0,0 +1,7 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="AndroidLintLockedOrientationActivity" enabled="false" level="ERROR" enabled_by_default="false" />
<inspection_tool class="AndroidLintSourceLockedOrientationActivity" enabled="false" level="ERROR" enabled_by_default="false" />
</profile>
</component>

+ 9
- 0
.idea/misc.xml Переглянути файл

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" 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>

+ 6
- 0
.idea/render.experimental.xml Переглянути файл

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RenderSettings">
<option name="showDecorations" value="true" />
</component>
</project>

+ 12
- 0
.idea/runConfigurations.xml Переглянути файл

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="org.jetbrains.plugins.gradle.execution.test.runner.AllInPackageGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestClassGradleConfigurationProducer" />
<option value="org.jetbrains.plugins.gradle.execution.test.runner.TestMethodGradleConfigurationProducer" />
</set>
</option>
</component>
</project>

+ 3
- 0
README.MD Переглянути файл

@@ -0,0 +1,3 @@
### 电子书项目

#### 开发工具 AndroidStudio

+ 1
- 0
app/.gitignore Переглянути файл

@@ -0,0 +1 @@
/build

+ 80
- 0
app/build.gradle Переглянути файл

@@ -0,0 +1,80 @@
apply plugin: 'com.android.application'

apply plugin: 'kotlin-android'

apply plugin: 'kotlin-android-extensions'

android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "com.yzx.webebook"
minSdkVersion 26
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
signingConfigs {
yzx {
keyAlias ALIAS_NAME
keyPassword ALIAS_PWD
storeFile file(KEY_PATH)
storePassword KEY_PWD
v2SigningEnabled false
}
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
zipAlignEnabled true
debuggable false
signingConfig signingConfigs.yzx
// 移除无用的resource文件
shrinkResources true
}

debug {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
debuggable true
signingConfig signingConfigs.yzx
// 移除无用的resource文件
shrinkResources false
}

applicationVariants.all { variant ->
variant.outputs.all { output ->
def fileName
fileName = "Yzx_${variant.versionName}.apk"
output.outputFileName = fileName
}
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation "org.jetbrains.anko:anko:$anko_version"
// 基础依赖包,必须要依赖
implementation 'com.gyf.immersionbar:immersionbar:3.0.0'
// fragment快速实现(可选)
implementation 'com.gyf.immersionbar:immersionbar-components:3.0.0'
// kotlin扩展(可选)
implementation 'com.gyf.immersionbar:immersionbar-ktx:3.0.0'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.google.android.material:material:1.1.0'
implementation 'androidx.core:core-ktx:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
implementation files('libs/wenote.jar')
implementation 'com.github.bumptech.glide:glide:4.11.0'
implementation 'com.lzy.net:okgo:3.0.4'
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'


}

BIN
app/libs/wenote.jar Переглянути файл


+ 21
- 0
app/proguard-rules.pro Переглянути файл

@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

+ 24
- 0
app/src/androidTest/java/com/yzx/webebook/ExampleInstrumentedTest.kt Переглянути файл

@@ -0,0 +1,24 @@
package com.yzx.webebook

import androidx.test.platform.app.InstrumentationRegistry
import androidx.test.ext.junit.runners.AndroidJUnit4

import org.junit.Test
import org.junit.runner.RunWith

import org.junit.Assert.*

/**
* Instrumented test, which will execute on an Android device.
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
@RunWith(AndroidJUnit4::class)
class ExampleInstrumentedTest {
@Test
fun useAppContext() {
// Context of the app under test.
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
assertEquals("com.yzx.webebook", appContext.packageName)
}
}

+ 53
- 0
app/src/main/AndroidManifest.xml Переглянути файл

@@ -0,0 +1,53 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.yzx.webebook">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_MEDIA_STORAGE"/>
<uses-permission android:name="android.permission.WAKE_LOCK" />

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:name=".App"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity"
android:screenOrientation="portrait"
android:launchMode="singleTask"
android:configChanges="orientation|keyboard">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".activity.WebActivity"
android:screenOrientation="portrait"
android:configChanges="orientation|keyboard"/>
<activity android:name=".activity.BookActivity"
android:screenOrientation="portrait"
android:configChanges="orientation|keyboard"/>
<provider
android:name=".utils.YzxFileProvider"
android:authorities="${applicationId}.fileProvider"
android:exported="false"
android:grantUriPermissions="true"
tools:replace="name,authorities,exported,grantUriPermissions">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths"
tools:replace="name,resource" />
</provider>
</application>

</manifest>

+ 12
- 0
app/src/main/java/com/yzx/webebook/App.kt Переглянути файл

@@ -0,0 +1,12 @@
package com.yzx.webebook

import android.app.Application
import com.lzy.okgo.OkGo

class App: Application() {

override fun onCreate() {
super.onCreate()
OkGo.getInstance().init(this)
}
}

+ 90
- 0
app/src/main/java/com/yzx/webebook/MainActivity.kt Переглянути файл

@@ -0,0 +1,90 @@
package com.yzx.webebook

import android.annotation.SuppressLint
import android.app.Activity
import android.content.Intent
import com.bumptech.glide.Glide
import com.yzx.webebook.activity.BookActivity
import com.yzx.webebook.activity.WebActivity
import com.yzx.webebook.activity.base.BaseActivity
import com.yzx.webebook.presenter.base.BasePresenter
import kotlinx.android.synthetic.main.activity_main.*
import java.io.File

/**
* Yun.Lei
* 2020年5月6日14:49:10
*/
class MainActivity : BaseActivity<BasePresenter<*>>() {


override val inflateId: Int
get() = R.layout.activity_main


override fun initView() {
btn1.setOnClickListener {
WebActivity.active(this, "https://m.qbjjyyun.net/")
}
btn2.setOnClickListener {
WebActivity.active(this, "https://m.live.educlouddata.com/")
}
btn6.setOnClickListener {
WebActivity.active(this, "http://192.168.69.200:8098/")
}
btn3.setOnClickListener {
WebActivity.active(this, editText.text.toString())
}
btn4.setOnClickListener {
BookActivity.active(this,"教育云空间","f04be754f6cb3f6168f582403a514c39","filec","",1,1)
}
btn5.setOnClickListener {
BookActivity.active(this,"教育云空间(无图)","","","",2,2)
}

/*OkGo.post<String>("https://fileupload.oa.qbjjyyun.net/edufile/fileUpload")
.tag(this)
.params("token","0fc58a8df03c46d3f85b1047c4693cf6")
.params("user","97244")
.params("file",file)
.execute(object : StringCallback(){
override fun onError(response: Response<String>?) {
super.onError(response)
Log.d("onError",response?.body())
}

override fun onSuccess(response: Response<String>?) {
val json = response?.body()
Log.d("onSuccess",response?.body())
val jsonObject = JSONObject(json)
val content = jsonObject.optString("content")
Log.d("onSuccess,content",content)
val contentObject = JSONObject(content)
val key = contentObject.optString("key")
val identity = contentObject.optString("identity")
Log.d("onSuccess,identity",identity)
Log.d("onSuccess,key",key)
}
})*/

}

override fun initData() {
}

override fun initPresenter(): BasePresenter<*>? = null

@SuppressLint("SetTextI18n")
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
if(requestCode==BookActivity.REQ_CODE&&resultCode== Activity.RESULT_OK){
val mKey = data?.getStringExtra("key")
val mIdentity = data?.getStringExtra("identity")

val url = "https://$mIdentity.oa.qbjjyyun.net/edufile/imageView?uniqueKey=$mKey"
Glide.with(this)
.load(url)
.into(testImageView)
}
}
}

+ 1060
- 0
app/src/main/java/com/yzx/webebook/activity/BookActivity.java
Різницю між файлами не показано, бо вона завелика
Переглянути файл


+ 273
- 0
app/src/main/java/com/yzx/webebook/activity/WebActivity.kt Переглянути файл

@@ -0,0 +1,273 @@
package com.yzx.webebook.activity

import android.annotation.SuppressLint
import android.app.Activity
import android.app.AlertDialog
import android.content.Intent
import android.net.http.SslError
import android.os.Build
import android.text.TextUtils
import android.util.Log
import android.view.View
import android.view.ViewGroup
import android.webkit.*
import android.widget.LinearLayout
import androidx.annotation.RequiresApi
import com.yzx.webebook.R
import com.yzx.webebook.activity.base.BaseActivity
import com.yzx.webebook.presenter.base.BasePresenter
import kotlinx.android.synthetic.main.activity_web.*
import org.jetbrains.anko.ctx
import org.jetbrains.anko.startActivity
import org.jetbrains.anko.toast
import org.json.JSONObject

/**
* 类名:WebActivity
* 作者:Yun.Lei
* 功能:
* 创建日期:2020年5月6日14:42:16
* 修改人:
* 修改时间:
* 修改备注:
*/
class WebActivity : BaseActivity<BasePresenter<*>>() {


companion object {
fun active(act: Activity, link: String) {
act.startActivity<WebActivity>("link" to link)
}
}

private val webView: WebView by lazy { WebView(this) }
private var url: String = ""
override val inflateId: Int
get() = R.layout.activity_web

@SuppressLint("SetJavaScriptEnabled")
override fun initView() {
url = intent?.getStringExtra("link") ?: "https://m.ykj.qbjjyyun.net/"

btnBack.setOnClickListener { onBackPressed() }
btnClose.setOnClickListener {
finish()
}
btnRefresh.setOnClickListener {
webView.reload()
}
webView.layoutParams = LinearLayout.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.MATCH_PARENT
)
webLayout.addView(webView)
webView.addJavascriptInterface(YzxJavascriptInterface(this), "YZX")
val userAgent = webView.settings.userAgentString
webView.settings.apply {
allowFileAccess = true
javaScriptEnabled = true
loadWithOverviewMode = true
useWideViewPort = true
defaultTextEncodingName = "gb2312"
setAppCacheEnabled(true)
mediaPlaybackRequiresUserGesture = false
javaScriptCanOpenWindowsAutomatically = true
cacheMode = WebSettings.LOAD_DEFAULT
databaseEnabled = true
setRenderPriority(WebSettings.RenderPriority.HIGH)
blockNetworkImage = false
domStorageEnabled = true
setAppCacheMaxSize(1024 * 1024 * 8)
setAppCachePath(ctx.cacheDir.absolutePath)
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
mixedContentMode = WebSettings.MIXED_CONTENT_ALWAYS_ALLOW
}
userAgentString = "$userAgent app/ebook"
}
webView.webViewClient = object : WebViewClient() {
@RequiresApi(Build.VERSION_CODES.LOLLIPOP)
override fun shouldOverrideUrlLoading(
view: WebView?,
request: WebResourceRequest?
): Boolean {
view?.loadUrl(request?.url.toString())
return super.shouldOverrideUrlLoading(view, request)
}

// 即使加载失败后,webview执行完onReceivedError()方法也会执行这个方法
override fun onPageFinished(view: WebView, url: String) {
super.onPageFinished(view, url)
webView.settings.blockNetworkImage = false
if (!TextUtils.isEmpty(view.title)) {
titleTv.text = view.title//webView获取到网页title
}
}

override fun onReceivedSslError(
view: WebView,
handler: SslErrorHandler,
error: SslError
) {
handler.proceed()
}
}
webView.webChromeClient = object : WebChromeClient() {
override fun onProgressChanged(view: WebView?, newProgress: Int) {
super.onProgressChanged(view, newProgress)
progressbar.progress = newProgress
if (newProgress >= 100) {
view?.post {
progressbar.visibility = View.GONE
if (view.canGoBack()) {
btnClose.visibility = View.VISIBLE
//btnBack.visibility = View.VISIBLE
} else {
btnClose.visibility = View.GONE
//btnBack.visibility = View.GONE
}
}
} else {
if (progressbar.visibility == View.GONE) {
view?.post { progressbar.visibility = View.VISIBLE }
}
}
}

override fun onJsAlert(
view: WebView?,
url: String?,
message: String?,
result: JsResult?
): Boolean {
val b = AlertDialog.Builder(this@WebActivity)
b.setTitle(message)
b.setPositiveButton("确定") { _, _ ->
result?.confirm()
}
return true
}
}
WebView.setWebContentsDebuggingEnabled(true) //将 WebViews 配置为可调试状态
webView.setLayerType(View.LAYER_TYPE_HARDWARE, null)
}

override fun initData() {
webView.loadUrl(url)
}

override fun initPresenter(): BasePresenter<*>? {
return null
}

override fun onResume() {
super.onResume()
webView.onResume()
}

override fun onPause() {
super.onPause()
webView.onPause()
}

override fun onBackPressed() {
if (webView.canGoBack()) {
webView.goBack()
} else {
super.onBackPressed()
}
}

override fun onDestroy() {
super.onDestroy()
webView.apply {
webViewClient = null
webChromeClient = null
(parent as ViewGroup).removeView(webView)
removeAllViews()
destroy()
}
}

/**
* 调用js方法
*/
private fun evaluateJavascript(funName: String, data: String) {
webView.post {
webView.evaluateJavascript("javascript:$funName('$data')") {
Log.d("javascriptCallBack:", it)
//toast(it)
}
}
}

@SuppressLint("SetTextI18n")
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
super.onActivityResult(requestCode, resultCode, data)
if (requestCode == BookActivity.REQ_CODE && resultCode == Activity.RESULT_OK) {
val mKey = data?.getStringExtra("key") ?: ""
val mIdentity = data?.getStringExtra("identity") ?: ""
val obj = JSONObject()
obj.put("key", mKey)
obj.put("identity", mIdentity)
obj.put("name", data?.getStringExtra("name") ?: "")
obj.put("index", data?.getIntExtra("index",0))
obj.put("type", data?.getIntExtra("type",1))
evaluateJavascript("onImageUploadSuccess", obj.toString())
}
}

}


class YzxJavascriptInterface(var ctx: Activity) {

/**
* 获取电子书的clientId
*/
@JavascriptInterface
fun getClientId(): Int = 601

/**
* 跳转到电子书页面
*/
@JavascriptInterface
fun bookPage(
title: String,
identity: String,
key: String,
name: String,
index: Int,
type: Int
) {
BookActivity.active(ctx, title, key, identity,name,index,type)
}

/**
* 提示
*/
@JavascriptInterface
fun toast(msg: String) {
ctx.toast("android:$msg")
}

}





















+ 73
- 0
app/src/main/java/com/yzx/webebook/activity/base/BaseActivity.kt Переглянути файл

@@ -0,0 +1,73 @@
package com.yzx.webebook.activity.base

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.gyf.immersionbar.ktx.immersionBar
import com.yzx.webebook.R
import com.yzx.webebook.presenter.base.BasePresenter

/**
* 类名:BaseActivity
* 作者:Yun.Lei
* 功能:
* 创建日期:2020年5月6日14:27:04
* 修改人:
* 修改时间:
* 修改备注:
*/
abstract class BaseActivity<out P : BasePresenter<*>> : AppCompatActivity() {

/**
* 当前页面需要加载的layoutId,等价setContentView
*/
abstract val inflateId: Int

/**
* 初始化视图操作在这里执行,执行时机为onCreate之后
*/
abstract fun initView(): Unit

/**
* 数据初始化在这里执行,执行时机为initView之后
*/
abstract fun initData(): Unit

//kotlin 懒加载,在第一次使用Presenter时初始化,这种设计是针对一个View只针对一个Presenter。
//多个Presenter的情况此处不应该使用泛型
protected val mPresenter: P? by lazy { initPresenter() }

abstract fun initPresenter(): P?



override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(inflateId)
initView()
initData()
setStatusBar()
}

open fun setStatusBar() {
immersionBar {
statusBarColor(R.color.white)
fitsSystemWindows(true)
statusBarDarkFont(true, 0.2f)
keyboardEnable(true)
init()
}
}





override fun onBackPressed() {
super.onBackPressed()
}

override fun onDestroy() {
super.onDestroy()
}

}

+ 13
- 0
app/src/main/java/com/yzx/webebook/model/UploadBean.kt Переглянути файл

@@ -0,0 +1,13 @@
package com.yzx.webebook.model

class UploadBean {
var code:Int = 0
var msg:String = ""
var content:UploadContent = UploadContent()
}

class UploadContent{
var identity:String = ""
var key:String = ""
var file_size:String = ""
}

+ 19
- 0
app/src/main/java/com/yzx/webebook/presenter/base/BasePresenter.kt Переглянути файл

@@ -0,0 +1,19 @@
package com.yzx.webebook.presenter.base

/**
* 类名:BasePresenter
* 作者:Yun.Lei
* 功能:
* 创建日期:2018-07-13 10:40
* 修改人:
* 修改时间:
* 修改备注:
*/
abstract class BasePresenter<T : IView>(view: T) {
protected var mView: T? = view

fun onDestroy() {
mView = null
}

}

+ 12
- 0
app/src/main/java/com/yzx/webebook/presenter/base/IView.kt Переглянути файл

@@ -0,0 +1,12 @@
package com.yzx.webebook.presenter.base

/**
* 类名:IView
* 作者:Yun.Lei
* 功能:
* 创建日期:2018-07-13 10:39
* 修改人:
* 修改时间:
* 修改备注:
*/
interface IView

+ 2
- 0
app/src/main/java/com/yzx/webebook/utils/KotlinX.kt Переглянути файл

@@ -0,0 +1,2 @@
package com.yzx.webebook.utils


+ 15
- 0
app/src/main/java/com/yzx/webebook/utils/YzxFileProvider.kt Переглянути файл

@@ -0,0 +1,15 @@
package com.yzx.webebook.utils

import androidx.core.content.FileProvider


/**
* 类名:YzxFileProvider
* 作者:Yun.Lei
* 功能:
* 创建日期:2020年5月6日14:09:27
* 修改人:
* 修改时间:
* 修改备注:
*/
class YzxFileProvider: FileProvider()

+ 22
- 0
app/src/main/java/com/yzx/webebook/widget/EBookView.java Переглянути файл

@@ -0,0 +1,22 @@
package com.yzx.webebook.widget;

import android.content.Context;
import android.graphics.drawable.Drawable;
import android.util.AttributeSet;

import com.wetao.note.WeNoteView;

public class EBookView extends WeNoteView {

public EBookView(Context context) {
super(context);
}

public EBookView(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
}

public void updateBackground(Drawable drawable){

}
}

+ 32
- 0
app/src/main/java/com/yzx/webebook/widget/ScrollTextView.kt Переглянути файл

@@ -0,0 +1,32 @@
package com.yzx.webebook.widget

import android.content.Context
import android.text.TextUtils
import android.util.AttributeSet
import androidx.appcompat.widget.AppCompatTextView

/**
* 类名:ScrollTextView
* 作者:Yun.Lei
* 功能:
* 创建日期:2020年5月6日14:29:39
* 修改人:
* 修改时间:
* 修改备注:
*/
class ScrollTextView : AppCompatTextView {

constructor(context: Context?) : super(context)
constructor(context: Context?, attrs: AttributeSet?) : super(context, attrs)
constructor(context: Context?, attrs: AttributeSet?, defStyleAttr: Int) : super(context, attrs, defStyleAttr)

init {
ellipsize = TextUtils.TruncateAt.MARQUEE
marqueeRepeatLimit = -1
isSingleLine = true
}

override fun isFocused(): Boolean {
return true
}
}

+ 1
- 0
app/src/main/jniLibs/armeabi/libpaintworker.so Переглянути файл

@@ -0,0 +1 @@
/system/lib/libpaintworker.so

+ 34
- 0
app/src/main/res/drawable-v24/ic_launcher_foreground.xml Переглянути файл

@@ -0,0 +1,34 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportHeight="108"
android:viewportWidth="108">
<path
android:fillType="evenOdd"
android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
android:strokeColor="#00000000"
android:strokeWidth="1">
<aapt:attr name="android:fillColor">
<gradient
android:endX="78.5885"
android:endY="90.9159"
android:startX="48.7653"
android:startY="61.0927"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C60.88,56.01 61.8,56.92 62.94,56.92ZM45.06,56.92C46.2,56.92 47.13,56.01 47.13,54.88C47.13,53.76 46.2,52.85 45.06,52.85C43.92,52.85 43,53.76 43,54.88C43,56.01 43.92,56.92 45.06,56.92Z"
android:strokeColor="#00000000"
android:strokeWidth="1" />
</vector>

+ 29
- 0
app/src/main/res/drawable-v24/progress_horizontal.xml Переглянути файл

@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">

<item android:id="@android:id/background">
<shape>
<corners android:radius="2dip" />
<solid android:color="@color/white" />
</shape>
</item>

<item android:id="@android:id/secondaryProgress">
<clip>
<shape>
<corners android:radius="2dip" />
<solid android:color="@color/white" />
</shape>
</clip>
</item>

<item android:id="@android:id/progress">
<clip>
<shape>
<corners android:radius="2dip" />
<solid android:color="@color/black" />
</shape>
</clip>
</item>

</layer-list>

BIN
app/src/main/res/drawable/Thumbs.db Переглянути файл


BIN
app/src/main/res/drawable/background0.png Переглянути файл

Перед Після
Ширина: 1404  |  Висота: 1872  |  Розмір: 14 KiB

BIN
app/src/main/res/drawable/background1.png Переглянути файл

Перед Після
Ширина: 1404  |  Висота: 1872  |  Розмір: 14 KiB

BIN
app/src/main/res/drawable/background10.png Переглянути файл

Перед Після
Ширина: 1404  |  Висота: 1872  |  Розмір: 14 KiB

BIN
app/src/main/res/drawable/background11.jpg Переглянути файл

Перед Після
Ширина: 595  |  Висота: 645  |  Розмір: 52 KiB

BIN
app/src/main/res/drawable/background2.png Переглянути файл

Перед Після
Ширина: 1404  |  Висота: 1872  |  Розмір: 15 KiB

BIN
app/src/main/res/drawable/background3.png Переглянути файл

Перед Після
Ширина: 1404  |  Висота: 1872  |  Розмір: 16 KiB

BIN
app/src/main/res/drawable/background4.png Переглянути файл

Перед Після
Ширина: 1404  |  Висота: 1872  |  Розмір: 16 KiB

BIN
app/src/main/res/drawable/background5.png Переглянути файл

Перед Після
Ширина: 1404  |  Висота: 1872  |  Розмір: 15 KiB

BIN
app/src/main/res/drawable/background6.png Переглянути файл

Перед Після
Ширина: 1404  |  Висота: 1872  |  Розмір: 15 KiB

BIN
app/src/main/res/drawable/background7.png Переглянути файл

Перед Після
Ширина: 1404  |  Висота: 1872  |  Розмір: 24 KiB

BIN
app/src/main/res/drawable/background8.png Переглянути файл

Перед Після
Ширина: 1404  |  Висота: 1872  |  Розмір: 269 KiB

BIN
app/src/main/res/drawable/background9.png Переглянути файл

Перед Після
Ширина: 1404  |  Висота: 1872  |  Розмір: 25 KiB

+ 5
- 0
app/src/main/res/drawable/btn_select.xml Переглянути файл

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@android:color/transparent" android:state_selected="true" />
<item android:drawable="@android:color/transparent" />
</selector>

+ 74
- 0
app/src/main/res/drawable/ic_launcher_background.xml Переглянути файл

@@ -0,0 +1,74 @@
<?xml version="1.0" encoding="utf-8"?>
<vector
android:height="108dp"
android:width="108dp"
android:viewportHeight="108"
android:viewportWidth="108"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#008577"
android:pathData="M0,0h108v108h-108z"/>
<path android:fillColor="#00000000" android:pathData="M9,0L9,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,0L19,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,0L29,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,0L39,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,0L49,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,0L59,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,0L69,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,0L79,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M89,0L89,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M99,0L99,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,9L108,9"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,19L108,19"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,29L108,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,39L108,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,49L108,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,59L108,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,69L108,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,79L108,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,89L108,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,99L108,99"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,29L89,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,39L89,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,49L89,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,59L89,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,69L89,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,79L89,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,19L29,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,19L39,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,19L49,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,19L59,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,19L69,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,19L79,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
</vector>

BIN
app/src/main/res/drawable/ic_note_page_left_normal.png Переглянути файл

Перед Після
Ширина: 27  |  Висота: 48  |  Розмір: 791 B

BIN
app/src/main/res/drawable/ic_note_page_right_normal.png Переглянути файл

Перед Після
Ширина: 27  |  Висота: 48  |  Розмір: 762 B

+ 29
- 0
app/src/main/res/drawable/progress_horizontal.xml Переглянути файл

@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">

<item android:id="@android:id/background">
<shape>
<corners android:radius="2dip" />
<solid android:color="@color/white" />
</shape>
</item>

<item android:id="@android:id/secondaryProgress">
<clip>
<shape>
<corners android:radius="2dip" />
<solid android:color="@color/white" />
</shape>
</clip>
</item>

<item android:id="@android:id/progress">
<clip>
<shape>
<corners android:radius="2dip" />
<solid android:color="@color/black" />
</shape>
</clip>
</item>

</layer-list>

+ 235
- 0
app/src/main/res/layout/activity_book.xml Переглянути файл

@@ -0,0 +1,235 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#ffffffff"
android:orientation="vertical">

<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="@dimen/title_height"
android:background="@color/white">

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<ImageView
android:id="@+id/btnBack"
android:layout_width="@dimen/title_height"
android:layout_height="@dimen/title_height"
android:background="?attr/selectableItemBackground"
android:scaleType="centerInside"
android:src="@mipmap/ic_back_def" />

<ImageView
android:id="@+id/btnClose"
android:layout_width="@dimen/title_height"
android:layout_height="@dimen/title_height"
android:layout_toEndOf="@+id/btnBack"
android:background="?attr/selectableItemBackground"
android:scaleType="centerInside"
android:src="@mipmap/ic_close"
android:visibility="gone" />

<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/titleTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginStart="96dp"
android:layout_marginEnd="96dp"
android:gravity="center"
android:textColor="@color/black"
android:textStyle="bold"
android:textSize="@dimen/title_text_size" />

<androidx.appcompat.widget.AppCompatButton
android:id="@+id/save"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:background="@drawable/btn_select"
android:paddingHorizontal="15dp"
android:textSize="@dimen/title_text_size"
android:textStyle="bold"
android:text="保存" />

<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentEnd="true"
android:layout_centerVertical="true"
android:layout_marginEnd="15dp"
android:orientation="horizontal"
android:visibility="gone">

<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/btnPre"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@mipmap/ic_left" />

<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tvIndex"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="1"
android:textColor="#2c2c2c" />

<androidx.appcompat.widget.AppCompatTextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="/"
android:textColor="#2c2c2c" />

<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/tvTotal"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="2"
android:textColor="#2c2c2c" />

<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/btnNext"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@mipmap/ic_right" />
</LinearLayout>

<ProgressBar
android:id="@+id/progressbar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="2dp"
android:layout_alignParentBottom="true"
android:max="100"
android:progress="0"
android:progressDrawable="@drawable/progress_horizontal"
android:visibility="visible" />
</RelativeLayout>
</com.google.android.material.appbar.AppBarLayout>

<LinearLayout
android:id="@+id/bottom_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:orientation="horizontal"
android:paddingTop="4dp">

<Button
android:id="@+id/delete"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/btn_select"
android:text="删除"
android:visibility="gone" />

<Button
android:id="@+id/init"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/btn_select"
android:text="背景0" />

<Button
android:id="@+id/clear"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/btn_select"
android:text="清除" />

<Button
android:id="@+id/redo"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/btn_select"
android:text="ReDo" />

<Button
android:id="@+id/undo"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/btn_select"
android:text="UnDo" />
<Button
android:id="@+id/pen_width_sub"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/btn_select"
android:text="-宽度3" />
<Button
android:id="@+id/pen_width"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/btn_select"
android:text="+宽度3" />

<Button
android:id="@+id/eraser_width"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/btn_select"
android:text="橡皮宽15" />

<CheckBox
android:id="@+id/strokes"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/btn_select"
android:text="笔锋" />

<CheckBox
android:id="@+id/eraser"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/btn_select"
android:text="橡皮擦" />

<Button
android:id="@+id/cancel"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:background="@drawable/btn_select"
android:text="退出"
android:visibility="gone" />

</LinearLayout>

<TextView
android:layout_width="match_parent"
android:layout_height="1dp"
android:background="#ff000000" />

<!-- <FrameLayout
android:id="@+id/tablet_view"
android:layout_width="fill_parent"
android:layout_height="match_parent" >
</FrameLayout> -->
<com.wetao.note.WeNoteView
android:id="@+id/note_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/bottom_view"
android:background="#ffffffff" />
<!-- <com.wetao.note.WeNoteView
android:id="@+id/note_view"
android:layout_width="1150px"
android:layout_height="1560px"
android:layout_marginLeft="103px"
android:layout_marginRight="150px"
android:layout_above="@+id/bottom_view"
android:background="#ffffffff" /> -->
</LinearLayout>

+ 98
- 0
app/src/main/res/layout/activity_main.xml Переглянути файл

@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
android:gravity="center_horizontal"
android:orientation="vertical">

<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="@dimen/title_height"
android:background="@color/white">

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/titleTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginStart="96dp"
android:layout_marginEnd="96dp"
android:gravity="center"
android:textColor="@color/black"
android:textSize="@dimen/title_text_size"
android:text="云智学电子书"/>


</RelativeLayout>
</com.google.android.material.appbar.AppBarLayout>

<androidx.appcompat.widget.AppCompatButton
android:id="@+id/btn1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="家校线上"
android:layout_marginTop="@dimen/d_20"/>

<androidx.appcompat.widget.AppCompatButton
android:id="@+id/btn2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="家校Live"
android:layout_marginTop="@dimen/d_20"/>

<androidx.appcompat.widget.AppCompatButton
android:id="@+id/btn6"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="家校本地"
android:layout_marginTop="@dimen/d_20"/>

<androidx.appcompat.widget.AppCompatEditText
android:id="@+id/editText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/d_20"
android:hint="输入网址"
android:paddingHorizontal="15dp"
android:text="http://192.168.69.200:8098/"/>

<androidx.appcompat.widget.AppCompatButton
android:id="@+id/btn3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="前往"
android:layout_marginTop="@dimen/d_20"/>

<androidx.appcompat.widget.AppCompatButton
android:id="@+id/btn4"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="电子书页面"
android:visibility="visible"
android:layout_marginTop="@dimen/d_20"/>

<androidx.appcompat.widget.AppCompatButton
android:id="@+id/btn5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="电子书页面(不带背景)"
android:visibility="visible"
android:layout_marginTop="@dimen/d_20"/>

<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/testImageView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/d_20"
android:adjustViewBounds="true"
android:visibility="visible"
android:scaleType="fitXY"/>
</androidx.appcompat.widget.LinearLayoutCompat>

+ 76
- 0
app/src/main/res/layout/activity_web.xml Переглянути файл

@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
tools:context=".activity.WebActivity">

<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="@dimen/title_height"
android:background="@color/white">

<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">

<ImageView
android:id="@+id/btnBack"
android:layout_width="@dimen/title_height"
android:layout_height="@dimen/title_height"
android:scaleType="centerInside"
android:src="@mipmap/ic_back_def"
android:visibility="visible"/>

<ImageView
android:id="@+id/btnClose"
android:layout_width="@dimen/title_height"
android:layout_height="@dimen/title_height"
android:layout_toEndOf="@+id/btnBack"
android:scaleType="centerInside"
android:src="@mipmap/ic_close"
android:visibility="gone" />

<ImageView
android:id="@+id/btnRefresh"
android:layout_width="@dimen/title_height"
android:layout_height="@dimen/title_height"
android:layout_toEndOf="@+id/btnClose"
android:scaleType="centerInside"
android:src="@mipmap/ic_refresh"/>

<androidx.appcompat.widget.AppCompatTextView
android:id="@+id/titleTv"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:layout_marginStart="360px"
android:layout_marginEnd="360px"
android:gravity="center"
android:textColor="@color/black"
android:textStyle="bold"
android:lines="1"
android:singleLine="true"
android:ellipsize="end"
android:textSize="@dimen/title_text_size" />

<ProgressBar
android:id="@+id/progressbar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="2dp"
android:layout_alignParentBottom="true"
android:max="100"
android:progress="0"
android:progressDrawable="@drawable/progress_horizontal"
android:visibility="visible" />
</RelativeLayout>
</com.google.android.material.appbar.AppBarLayout>

<LinearLayout
android:id="@+id/webLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" />
</LinearLayout>

+ 5
- 0
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml Переглянути файл

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>

+ 5
- 0
app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml Переглянути файл

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background"/>
<foreground android:drawable="@drawable/ic_launcher_foreground"/>
</adaptive-icon>

BIN
app/src/main/res/mipmap-hdpi/ic_launcher.png Переглянути файл

Перед Після
Ширина: 72  |  Висота: 72  |  Розмір: 2.9 KiB

BIN
app/src/main/res/mipmap-hdpi/ic_launcher_round.png Переглянути файл

Перед Після
Ширина: 72  |  Висота: 72  |  Розмір: 4.8 KiB

BIN
app/src/main/res/mipmap-mdpi/ic_launcher.png Переглянути файл

Перед Після
Ширина: 48  |  Висота: 48  |  Розмір: 2.0 KiB

BIN
app/src/main/res/mipmap-mdpi/ic_launcher_round.png Переглянути файл

Перед Після
Ширина: 48  |  Висота: 48  |  Розмір: 2.7 KiB

BIN
app/src/main/res/mipmap-xhdpi/ic_back_def.png Переглянути файл

Перед Після
Ширина: 64  |  Висота: 64  |  Розмір: 1.1 KiB

BIN
app/src/main/res/mipmap-xhdpi/ic_close.png Переглянути файл

Перед Після
Ширина: 64  |  Висота: 64  |  Розмір: 1.4 KiB

BIN
app/src/main/res/mipmap-xhdpi/ic_launcher.png Переглянути файл

Перед Після
Ширина: 96  |  Висота: 96  |  Розмір: 4.4 KiB

BIN
app/src/main/res/mipmap-xhdpi/ic_launcher_round.png Переглянути файл

Перед Після
Ширина: 96  |  Висота: 96  |  Розмір: 6.7 KiB

BIN
app/src/main/res/mipmap-xhdpi/ic_left.png Переглянути файл

Перед Після
Ширина: 32  |  Висота: 32  |  Розмір: 298 B

BIN
app/src/main/res/mipmap-xhdpi/ic_refresh.png Переглянути файл

Перед Після
Ширина: 64  |  Висота: 64  |  Розмір: 1.3 KiB

BIN
app/src/main/res/mipmap-xhdpi/ic_right.png Переглянути файл

Перед Після
Ширина: 32  |  Висота: 32  |  Розмір: 287 B

BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher.png Переглянути файл

Перед Після
Ширина: 144  |  Висота: 144  |  Розмір: 6.2 KiB

BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png Переглянути файл

Перед Після
Ширина: 144  |  Висота: 144  |  Розмір: 10 KiB

BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher.png Переглянути файл

Перед Після
Ширина: 192  |  Висота: 192  |  Розмір: 8.9 KiB

BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png Переглянути файл

Перед Після
Ширина: 192  |  Висота: 192  |  Розмір: 15 KiB

+ 25
- 0
app/src/main/res/values/colors.xml Переглянути файл

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#008577</color>
<color name="colorPrimaryDark">#00574B</color>
<color name="colorAccent">#D81B60</color>
<color name="white">#FFFFFF</color>
<color name="black">#000000</color>
<color name="colorBlack10">#19000000</color>
<color name="colorBlack20">#33000000</color>
<color name="colorBlack40">#66000000</color>
<color name="colorBlack60">#99000000</color>
<color name="colorBlack80">#cc000000</color>
<color name="black_11">#11333333</color>
<color name="black_1">#222222</color>
<color name="gray">#666666</color>
<color name="gray_1">#999999</color>
<color name="gray_2">#cccccc</color>
<color name="line_color">#D8D8D8</color>
<color name="backgroundColor">#f8f8f8</color>
<color name="red">#ff4444</color>
<color name="green">#54b3b3</color>
<color name="blue">#4d92dc</color>
<color name="orange">#ff8635</color>
<color name="transparent">@android:color/transparent</color>
</resources>

+ 42
- 0
app/src/main/res/values/dimens.xml Переглянути файл

@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<dimen name="title_height">120px</dimen>
<dimen name="title_text_size">40px</dimen>
<dimen name="sp12">12sp</dimen>
<dimen name="sp14">14sp</dimen>
<dimen name="sp16">16sp</dimen>
<dimen name="sp18">18sp</dimen>
<dimen name="sp20">20sp</dimen>
<dimen name="p_1">1px</dimen>
<dimen name="d_1">1dp</dimen>
<dimen name="d_2">2dp</dimen>
<dimen name="d_3">3dp</dimen>
<dimen name="d_4">4dp</dimen>
<dimen name="d_5">5dp</dimen>
<dimen name="d_6">6dp</dimen>
<dimen name="d_7">7dp</dimen>
<dimen name="d_8">8dp</dimen>
<dimen name="d_9">9dp</dimen>
<dimen name="d_10">10dp</dimen>
<dimen name="d_11">11dp</dimen>
<dimen name="d_12">12dp</dimen>
<dimen name="d_13">13dp</dimen>
<dimen name="d_14">14dp</dimen>
<dimen name="d_15">15dp</dimen>
<dimen name="d_16">16dp</dimen>
<dimen name="d_17">17dp</dimen>
<dimen name="d_18">18dp</dimen>
<dimen name="d_19">19dp</dimen>
<dimen name="d_20">20dp</dimen>
<dimen name="d_21">21dp</dimen>
<dimen name="d_22">22dp</dimen>
<dimen name="d_23">23dp</dimen>
<dimen name="d_24">24dp</dimen>
<dimen name="d_25">25dp</dimen>
<dimen name="d_26">26dp</dimen>
<dimen name="d_27">27dp</dimen>
<dimen name="d_28">28dp</dimen>
<dimen name="d_29">29dp</dimen>
<dimen name="d_30">30dp</dimen>
</resources>

+ 3
- 0
app/src/main/res/values/strings.xml Переглянути файл

@@ -0,0 +1,3 @@
<resources>
<string name="app_name">云智学</string>
</resources>

+ 12
- 0
app/src/main/res/values/styles.xml Переглянути файл

@@ -0,0 +1,12 @@
<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:windowBackground">@color/backgroundColor</item>
</style>

</resources>

+ 8
- 0
app/src/main/res/xml/provider_paths.xml Переглянути файл

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>

<paths>
<external-path path="" name="download"/>
</paths>

</resources>

+ 17
- 0
app/src/test/java/com/yzx/webebook/ExampleUnitTest.kt Переглянути файл

@@ -0,0 +1,17 @@
package com.yzx.webebook

import org.junit.Test

import org.junit.Assert.*

/**
* Example local unit test, which will execute on the development machine (host).
*
* See [testing documentation](http://d.android.com/tools/testing).
*/
class ExampleUnitTest {
@Test
fun addition_isCorrect() {
assertEquals(4, 2 + 2)
}
}

+ 29
- 0
build.gradle Переглянути файл

@@ -0,0 +1,29 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
ext.kotlin_version = '1.3.71'
ext.anko_version='0.10.8'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
google()
jcenter()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

+ 32
- 0
gradle.properties Переглянути файл

@@ -0,0 +1,32 @@
# Project-wide Gradle settings.

# IDE (e.g. Android Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.

# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html

# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
org.gradle.jvmargs=-Xmx1536m

# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true

# AndroidX package structure to make it clearer which packages are bundled with the
# Android operating system, and which are packaged with your app's APK
# https://developer.android.com/topic/libraries/support-library/androidx-rn
android.useAndroidX=true
# Automatically convert third-party libraries to use AndroidX
android.enableJetifier=true

# Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official

ALIAS_NAME = key0
ALIAS_PWD = yzx123456
KEY_PATH = ../yzx.jks
KEY_PWD = yzx123456

BIN
gradle/wrapper/gradle-wrapper.jar Переглянути файл


+ 6
- 0
gradle/wrapper/gradle-wrapper.properties Переглянути файл

@@ -0,0 +1,6 @@
#Wed May 06 13:56:55 CST 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip

+ 172
- 0
gradlew Переглянути файл

@@ -0,0 +1,172 @@
#!/usr/bin/env sh

##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################

# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null

APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`

# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""

# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"

warn () {
echo "$*"
}

die () {
echo
echo "$*"
echo
exit 1
}

# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac

CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar

# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.

Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi

# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi

# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi

# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`

# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option

if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi

# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")

# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"

# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi

exec "$JAVACMD" "$@"

+ 84
- 0
gradlew.bat Переглянути файл

@@ -0,0 +1,84 @@
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################

@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal

set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%

@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=

@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome

set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto init

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.

goto fail

:init
@rem Get command-line arguments, handling Windows variants

if not "%OS%" == "Windows_NT" goto win9xME_args

:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2

:win9xME_args_slurp
if "x%~1" == "x" goto execute

set CMD_LINE_ARGS=%*

:execute
@rem Setup the command line

set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar

@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%

:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1

:mainEnd
if "%OS%"=="Windows_NT" endlocal

:omega

+ 390
- 0
hs_err_pid15488.log Переглянути файл

@@ -0,0 +1,390 @@
#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 2110432 bytes for Chunk::new
# Possible reasons:
# The system is out of physical RAM or swap space
# The process is running with CompressedOops enabled, and the Java Heap may be blocking the growth of the native heap
# Possible solutions:
# Reduce memory load on the system
# Increase physical memory or swap space
# Check if swap backing store is full
# Decrease Java heap size (-Xmx/-Xms)
# Decrease number of Java threads
# Decrease Java thread stack sizes (-Xss)
# Set larger code cache with -XX:ReservedCodeCacheSize=
# JVM is running with Unscaled Compressed Oops mode in which the Java heap is
# placed in the first 4GB address space. The Java Heap base address is the
# maximum limit for the native heap growth. Please use -XX:HeapBaseMinAddress
# to set the Java Heap base and to place the Java Heap above 4GB virtual address.
# This output file may be truncated or incomplete.
#
# Out of Memory Error (allocation.cpp:389), pid=15488, tid=0x00000000000001fc
#
# JRE version: OpenJDK Runtime Environment (8.0_212-b04) (build 1.8.0_212-release-1586-b04)
# Java VM: OpenJDK 64-Bit Server VM (25.212-b04 mixed mode windows-amd64 compressed oops)
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#

--------------- T H R E A D ---------------

Current thread (0x0000000016e68000): JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=508, stack(0x0000000018770000,0x0000000018870000)]

Stack: [0x0000000018770000,0x0000000018870000]
[error occurred during error reporting (printing stack bounds), id 0xc0000005]

Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)


Current CompileTask:
C2:4647675 44234 ! 4 com.android.tools.r8.dex.m::b (2743 bytes)


--------------- P R O C E S S ---------------

Java Threads: ( => current thread )
0x000000001e2c6800 JavaThread "Cache worker for Java compile cache (C:\work\WebEBook\.gradle\5.6.4\javaCompile)" [_thread_blocked, id=16832, stack(0x000000002b620000,0x000000002b720000)]
0x000000001e2c3000 JavaThread "WorkerExecutor Queue Thread 5" [_thread_blocked, id=10672, stack(0x000000002fa80000,0x000000002fb80000)]
0x000000001e2c2800 JavaThread "stdout" [_thread_in_native, id=1204, stack(0x000000002f880000,0x000000002f980000)]
0x000000001ffe3800 JavaThread "stderr" [_thread_in_native, id=14344, stack(0x000000002f480000,0x000000002f580000)]
0x000000001ffe0800 JavaThread "stdout" [_thread_in_native, id=16976, stack(0x000000002c110000,0x000000002c210000)]
0x000000001ffdf000 JavaThread "stderr" [_thread_in_native, id=10988, stack(0x000000002c010000,0x000000002c110000)]
0x000000001ffdc000 JavaThread "stdout" [_thread_in_native, id=14544, stack(0x000000002bf10000,0x000000002c010000)]
0x000000001ffde000 JavaThread "stderr" [_thread_in_native, id=7248, stack(0x000000002bb20000,0x000000002bc20000)]
0x000000001ffdc800 JavaThread "stdout" [_thread_in_native, id=16556, stack(0x000000002ba20000,0x000000002bb20000)]
0x000000001ffdf800 JavaThread "stderr" [_thread_in_native, id=16548, stack(0x000000002b920000,0x000000002ba20000)]
0x000000001ffe1000 JavaThread "pool-31-thread-1" [_thread_blocked, id=16612, stack(0x000000002b410000,0x000000002b510000)]
0x000000001ffe2800 JavaThread "WorkerExecutor Queue Thread 4" [_thread_blocked, id=15264, stack(0x000000002b820000,0x000000002b920000)]
0x000000001ffda800 JavaThread "WorkerExecutor Queue" [_thread_blocked, id=17244, stack(0x000000002b520000,0x000000002b620000)]
0x000000001ffd6000 JavaThread "Cache worker for execution history cache (C:\work\WebEBook\.gradle\5.6.4\executionHistory)" [_thread_blocked, id=17384, stack(0x0000000029d70000,0x0000000029e70000)]
0x00000000181c1000 JavaThread "Execution worker for ':' Thread 3" [_thread_in_Java, id=14680, stack(0x000000002b310000,0x000000002b410000)]
0x00000000181c0800 JavaThread "Execution worker for ':' Thread 2" [_thread_in_Java, id=5192, stack(0x0000000029fe0000,0x000000002a0e0000)]
0x00000000181bf800 JavaThread "Execution worker for ':'" [_thread_in_native, id=6388, stack(0x0000000029ee0000,0x0000000029fe0000)]
0x00000000181bf000 JavaThread "Cache worker for file content cache (C:\work\WebEBook\.gradle\5.6.4\fileContent)" [_thread_blocked, id=13396, stack(0x0000000029ae0000,0x0000000029be0000)]
0x00000000181be000 JavaThread "Cache worker for Build Output Cleanup Cache (C:\work\WebEBook\.gradle\buildOutputCleanup)" [_thread_blocked, id=15100, stack(0x0000000027b60000,0x0000000027c60000)]
0x00000000181bd800 JavaThread "Build operations Thread 4" [_thread_blocked, id=13092, stack(0x0000000023790000,0x0000000023890000)]
0x00000000181c2000 JavaThread "Build operations Thread 3" [_thread_blocked, id=16140, stack(0x0000000023090000,0x0000000023190000)]
0x00000000181b6000 JavaThread "Build operations Thread 2" [_thread_blocked, id=16696, stack(0x0000000022f90000,0x0000000023090000)]
0x00000000181bc800 JavaThread "Build operations" [_thread_blocked, id=15828, stack(0x0000000022c90000,0x0000000022d90000)]
0x00000000181b8000 JavaThread "Cache worker for cache directory md-rule (C:\Users\Administrator\.gradle\caches\5.6.4\md-rule)" [_thread_blocked, id=16536, stack(0x0000000022b90000,0x0000000022c90000)]
0x00000000181b5000 JavaThread "Cache worker for cache directory md-supplier (C:\Users\Administrator\.gradle\caches\5.6.4\md-supplier)" [_thread_blocked, id=5076, stack(0x0000000022a90000,0x0000000022b90000)]
0x00000000181bc000 JavaThread "Cache worker for file hash cache (C:\work\WebEBook\.gradle\5.6.4\fileHashes)" [_thread_blocked, id=11564, stack(0x0000000022990000,0x0000000022a90000)]
0x00000000181b7800 JavaThread "Thread-165" [_thread_blocked, id=11676, stack(0x0000000021dc0000,0x0000000021ec0000)]
0x00000000181b4800 JavaThread "Stdin handler" [_thread_blocked, id=14748, stack(0x000000001eeb0000,0x000000001efb0000)]
0x00000000181bb000 JavaThread "Asynchronous log dispatcher for DefaultDaemonConnection: socket connection from /127.0.0.1:62307 to /127.0.0.1:50065" [_thread_blocked, id=4040, stack(0x000000001ebb0000,0x000000001ecb0000)]
0x00000000181b6800 JavaThread "Daemon worker Thread 8" [_thread_in_Java, id=16664, stack(0x000000001c110000,0x000000001c210000)]
0x00000000181ba800 JavaThread "Cancel handler" [_thread_blocked, id=12800, stack(0x000000001bd10000,0x000000001be10000)]
0x00000000181b9800 JavaThread "Handler for socket connection from /127.0.0.1:62307 to /127.0.0.1:50065" [_thread_in_native, id=13052, stack(0x000000001ba10000,0x000000001bb10000)]
0x00000000181b9000 JavaThread "Daemon Thread 8" [_thread_blocked, id=14072, stack(0x000000001b910000,0x000000001ba10000)]
0x00000000181b3000 JavaThread "RMI TCP Connection(4)-127.0.0.1" daemon [_thread_in_native, id=7540, stack(0x0000000001420000,0x0000000001520000)]
0x000000001e2c5000 JavaThread "Cache worker for Java compile cache (C:\Users\Administrator\.gradle\caches\5.6.4\javaCompile)" [_thread_blocked, id=10328, stack(0x000000002f980000,0x000000002fa80000)]
0x000000001e2c5800 JavaThread "RMI Reaper" [_thread_blocked, id=656, stack(0x000000002f780000,0x000000002f880000)]
0x000000001e2c7000 JavaThread "RMI TCP Accept-0" daemon [_thread_in_native, id=12776, stack(0x000000002f680000,0x000000002f780000)]
0x000000001e2cb000 JavaThread "GC Daemon" daemon [_thread_blocked, id=16268, stack(0x000000002f580000,0x000000002f680000)]
0x000000001e2be000 JavaThread "RMI Scheduler(0)" daemon [_thread_blocked, id=13656, stack(0x000000002f380000,0x000000002f480000)]
0x0000000018340000 JavaThread "Cache worker for file content cache (C:\Users\Administrator\.gradle\caches\5.6.4\fileContent)" [_thread_blocked, id=2696, stack(0x0000000024490000,0x0000000024590000)]
0x0000000018345800 JavaThread "Memory manager" [_thread_blocked, id=11972, stack(0x0000000024630000,0x0000000024730000)]
0x000000001a832000 JavaThread "Cache worker for execution history cache (C:\Users\Administrator\.gradle\caches\5.6.4\executionHistory)" [_thread_blocked, id=2656, stack(0x0000000020450000,0x0000000020550000)]
0x000000001a833800 JavaThread "Cache worker for journal cache (C:\Users\Administrator\.gradle\caches\journal-1)" [_thread_blocked, id=15456, stack(0x000000001c610000,0x000000001c710000)]
0x000000001a838000 JavaThread "File lock request listener" [_thread_in_native, id=15500, stack(0x000000001c510000,0x000000001c610000)]
0x000000001a77e800 JavaThread "Cache worker for file hash cache (C:\Users\Administrator\.gradle\caches\5.6.4\fileHashes)" [_thread_blocked, id=8580, stack(0x000000001c410000,0x000000001c510000)]
0x000000001a64c800 JavaThread "Daemon periodic checks" [_thread_blocked, id=14732, stack(0x000000001b810000,0x000000001b910000)]
0x000000001a64b800 JavaThread "Incoming local TCP Connector on port 62307" [_thread_in_native, id=6244, stack(0x000000001b710000,0x000000001b810000)]
0x000000001946a800 JavaThread "Daemon health stats" [_thread_blocked, id=11808, stack(0x000000001b410000,0x000000001b510000)]
0x0000000018208800 JavaThread "Service Thread" daemon [_thread_blocked, id=12924, stack(0x0000000018a70000,0x0000000018b70000)]
0x000000001817d800 JavaThread "C1 CompilerThread2" daemon [_thread_blocked, id=5612, stack(0x0000000018970000,0x0000000018a70000)]
0x0000000016e6c000 JavaThread "C2 CompilerThread1" daemon [_thread_in_native, id=15840, stack(0x0000000018870000,0x0000000018970000)]
=>0x0000000016e68000 JavaThread "C2 CompilerThread0" daemon [_thread_in_native, id=508, stack(0x0000000018770000,0x0000000018870000)]
0x0000000016e1d800 JavaThread "Attach Listener" daemon [_thread_blocked, id=13992, stack(0x0000000018670000,0x0000000018770000)]
0x0000000018178800 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=16096, stack(0x0000000018570000,0x0000000018670000)]
0x0000000003499800 JavaThread "Finalizer" daemon [_thread_blocked, id=15740, stack(0x0000000018070000,0x0000000018170000)]
0x0000000003491000 JavaThread "Reference Handler" daemon [_thread_blocked, id=13224, stack(0x0000000017f70000,0x0000000018070000)]
0x000000000329e000 JavaThread "main" [_thread_blocked, id=14928, stack(0x00000000032a0000,0x00000000033a0000)]

Other Threads:
0x0000000016dd6000 VMThread [stack: 0x0000000017e70000,0x0000000017f70000] [id=3260]
0x0000000018209800 WatcherThread [stack: 0x0000000018b70000,0x0000000018c70000] [id=11356]

VM state:not at safepoint (normal execution)

VM Mutex/Monitor currently owned by a thread: None

heap address: 0x00000000a0000000, size: 1536 MB, Compressed Oops mode: 32-bit
Narrow klass base: 0x0000000000000000, Narrow klass shift: 3
Compressed class space size: 1073741824 Address: 0x0000000100000000

Heap:
PSYoungGen total 471552K, used 84155K [0x00000000e0000000, 0x00000000ff800000, 0x0000000100000000)
eden space 427008K, 18% used [0x00000000e0000000,0x00000000e4cb7ba8,0x00000000fa100000)
from space 44544K, 12% used [0x00000000fa100000,0x00000000fa6771b8,0x00000000fcc80000)
to space 42496K, 0% used [0x00000000fce80000,0x00000000fce80000,0x00000000ff800000)
ParOldGen total 568320K, used 387928K [0x00000000a0000000, 0x00000000c2b00000, 0x00000000e0000000)
object space 568320K, 68% used [0x00000000a0000000,0x00000000b7ad6260,0x00000000c2b00000)
Metaspace used 194759K, capacity 203477K, committed 203776K, reserved 1226752K
class space used 24107K, capacity 25675K, committed 25856K, reserved 1048576K

Card table byte_map: [0x0000000012860000,0x0000000012b70000] byte_map_base: 0x0000000012360000

Marking Bits: (ParMarkBitMap*) 0x0000000077f79f30
Begin Bits: [0x0000000013170000, 0x0000000014970000)
End Bits: [0x0000000014970000, 0x0000000016170000)

Polling page: 0x0000000001570000

CodeCache: size=245760Kb used=123186Kb max_used=123211Kb free=122573Kb
bounds [0x00000000034a0000, 0x000000000adb0000, 0x00000000124a0000]
total_blobs=34822 nmethods=33765 adapters=965
compilation: enabled

Compilation events (10 events):
Event: 4647.478 Thread 0x000000001817d800 44242 2 com.android.tools.r8.u.b.l1::b (10 bytes)
Event: 4647.478 Thread 0x000000001817d800 nmethod 44242 0x000000000ad3e410 code [0x000000000ad3e580, 0x000000000ad3e748]
Event: 4647.546 Thread 0x000000001817d800 44244 1 com.android.tools.r8.graph.y$a::d (5 bytes)
Event: 4647.547 Thread 0x000000001817d800 nmethod 44244 0x000000000ad3e150 code [0x000000000ad3e2a0, 0x000000000ad3e3b0]
Event: 4647.547 Thread 0x000000001817d800 44245 1 com.android.tools.r8.dex.K::a (5 bytes)
Event: 4647.547 Thread 0x000000001817d800 nmethod 44245 0x000000000ad3de90 code [0x000000000ad3dfe0, 0x000000000ad3e0d0]
Event: 4647.547 Thread 0x000000001817d800 44246 1 com.android.tools.r8.dex.K::e (5 bytes)
Event: 4647.547 Thread 0x000000001817d800 nmethod 44246 0x000000000ad3dbd0 code [0x000000000ad3dd20, 0x000000000ad3de30]
Event: 4647.649 Thread 0x000000001817d800 44247 1 com.android.tools.r8.graph.DexValue$e::n (2 bytes)
Event: 4647.650 Thread 0x000000001817d800 nmethod 44247 0x000000000ad3d910 code [0x000000000ad3da60, 0x000000000ad3db70]

GC Heap History (10 events):
Event: 4645.337 GC heap before
{Heap before GC invocations=77 (full 6):
PSYoungGen total 463872K, used 413306K [0x00000000e0000000, 0x00000000ffa80000, 0x0000000100000000)
eden space 409088K, 100% used [0x00000000e0000000,0x00000000f8f80000,0x00000000f8f80000)
from space 54784K, 7% used [0x00000000fc500000,0x00000000fc91eb78,0x00000000ffa80000)
to space 54784K, 0% used [0x00000000f8f80000,0x00000000f8f80000,0x00000000fc500000)
ParOldGen total 568320K, used 363386K [0x00000000a0000000, 0x00000000c2b00000, 0x00000000e0000000)
object space 568320K, 63% used [0x00000000a0000000,0x00000000b62deb78,0x00000000c2b00000)
Metaspace used 194734K, capacity 203473K, committed 203776K, reserved 1226752K
class space used 24107K, capacity 25675K, committed 25856K, reserved 1048576K
Event: 4645.354 GC heap after
Heap after GC invocations=77 (full 6):
PSYoungGen total 463872K, used 6009K [0x00000000e0000000, 0x00000000ffc00000, 0x0000000100000000)
eden space 409088K, 0% used [0x00000000e0000000,0x00000000e0000000,0x00000000f8f80000)
from space 54784K, 10% used [0x00000000f8f80000,0x00000000f955e4f0,0x00000000fc500000)
to space 52736K, 0% used [0x00000000fc880000,0x00000000fc880000,0x00000000ffc00000)
ParOldGen total 568320K, used 366070K [0x00000000a0000000, 0x00000000c2b00000, 0x00000000e0000000)
object space 568320K, 64% used [0x00000000a0000000,0x00000000b657dac8,0x00000000c2b00000)
Metaspace used 194734K, capacity 203473K, committed 203776K, reserved 1226752K
class space used 24107K, capacity 25675K, committed 25856K, reserved 1048576K
}
Event: 4645.852 GC heap before
{Heap before GC invocations=78 (full 6):
PSYoungGen total 463872K, used 415097K [0x00000000e0000000, 0x00000000ffc00000, 0x0000000100000000)
eden space 409088K, 100% used [0x00000000e0000000,0x00000000f8f80000,0x00000000f8f80000)
from space 54784K, 10% used [0x00000000f8f80000,0x00000000f955e4f0,0x00000000fc500000)
to space 52736K, 0% used [0x00000000fc880000,0x00000000fc880000,0x00000000ffc00000)
ParOldGen total 568320K, used 366070K [0x00000000a0000000, 0x00000000c2b00000, 0x00000000e0000000)
object space 568320K, 64% used [0x00000000a0000000,0x00000000b657dac8,0x00000000c2b00000)
Metaspace used 194745K, capacity 203473K, committed 203776K, reserved 1226752K
class space used 24107K, capacity 25675K, committed 25856K, reserved 1048576K
Event: 4645.871 GC heap after
Heap after GC invocations=78 (full 6):
PSYoungGen total 465408K, used 9981K [0x00000000e0000000, 0x00000000ff800000, 0x0000000100000000)
eden space 416768K, 0% used [0x00000000e0000000,0x00000000e0000000,0x00000000f9700000)
from space 48640K, 20% used [0x00000000fc880000,0x00000000fd23f7f0,0x00000000ff800000)
to space 49664K, 0% used [0x00000000f9700000,0x00000000f9700000,0x00000000fc780000)
ParOldGen total 568320K, used 368633K [0x00000000a0000000, 0x00000000c2b00000, 0x00000000e0000000)
object space 568320K, 64% used [0x00000000a0000000,0x00000000b67fe408,0x00000000c2b00000)
Metaspace used 194745K, capacity 203473K, committed 203776K, reserved 1226752K
class space used 24107K, capacity 25675K, committed 25856K, reserved 1048576K
}
Event: 4646.389 GC heap before
{Heap before GC invocations=79 (full 6):
PSYoungGen total 465408K, used 426749K [0x00000000e0000000, 0x00000000ff800000, 0x0000000100000000)
eden space 416768K, 100% used [0x00000000e0000000,0x00000000f9700000,0x00000000f9700000)
from space 48640K, 20% used [0x00000000fc880000,0x00000000fd23f7f0,0x00000000ff800000)
to space 49664K, 0% used [0x00000000f9700000,0x00000000f9700000,0x00000000fc780000)
ParOldGen total 568320K, used 368633K [0x00000000a0000000, 0x00000000c2b00000, 0x00000000e0000000)
object space 568320K, 64% used [0x00000000a0000000,0x00000000b67fe408,0x00000000c2b00000)
Metaspace used 194747K, capacity 203473K, committed 203776K, reserved 1226752K
class space used 24107K, capacity 25675K, committed 25856K, reserved 1048576K
Event: 4646.407 GC heap after
Heap after GC invocations=79 (full 6):
PSYoungGen total 466432K, used 4880K [0x00000000e0000000, 0x00000000ffd00000, 0x0000000100000000)
eden space 416768K, 0% used [0x00000000e0000000,0x00000000e0000000,0x00000000f9700000)
from space 49664K, 9% used [0x00000000f9700000,0x00000000f9bc4010,0x00000000fc780000)
to space 47616K, 0% used [0x00000000fce80000,0x00000000fce80000,0x00000000ffd00000)
ParOldGen total 568320K, used 375316K [0x00000000a0000000, 0x00000000c2b00000, 0x00000000e0000000)
object space 568320K, 66% used [0x00000000a0000000,0x00000000b6e85258,0x00000000c2b00000)
Metaspace used 194747K, capacity 203473K, committed 203776K, reserved 1226752K
class space used 24107K, capacity 25675K, committed 25856K, reserved 1048576K
}
Event: 4646.931 GC heap before
{Heap before GC invocations=80 (full 6):
PSYoungGen total 466432K, used 421648K [0x00000000e0000000, 0x00000000ffd00000, 0x0000000100000000)
eden space 416768K, 100% used [0x00000000e0000000,0x00000000f9700000,0x00000000f9700000)
from space 49664K, 9% used [0x00000000f9700000,0x00000000f9bc4010,0x00000000fc780000)
to space 47616K, 0% used [0x00000000fce80000,0x00000000fce80000,0x00000000ffd00000)
ParOldGen total 568320K, used 375316K [0x00000000a0000000, 0x00000000c2b00000, 0x00000000e0000000)
object space 568320K, 66% used [0x00000000a0000000,0x00000000b6e85258,0x00000000c2b00000)
Metaspace used 194750K, capacity 203473K, committed 203776K, reserved 1226752K
class space used 24107K, capacity 25675K, committed 25856K, reserved 1048576K
Event: 4646.948 GC heap after
Heap after GC invocations=80 (full 6):
PSYoungGen total 469504K, used 12654K [0x00000000e0000000, 0x00000000ff800000, 0x0000000100000000)
eden space 427008K, 0% used [0x00000000e0000000,0x00000000e0000000,0x00000000fa100000)
from space 42496K, 29% used [0x00000000fce80000,0x00000000fdadb8f0,0x00000000ff800000)
to space 44544K, 0% used [0x00000000fa100000,0x00000000fa100000,0x00000000fcc80000)
ParOldGen total 568320K, used 378022K [0x00000000a0000000, 0x00000000c2b00000, 0x00000000e0000000)
object space 568320K, 66% used [0x00000000a0000000,0x00000000b7129a20,0x00000000c2b00000)
Metaspace used 194750K, capacity 203473K, committed 203776K, reserved 1226752K
class space used 24107K, capacity 25675K, committed 25856K, reserved 1048576K
}
Event: 4647.568 GC heap before
{Heap before GC invocations=81 (full 6):
PSYoungGen total 469504K, used 439662K [0x00000000e0000000, 0x00000000ff800000, 0x0000000100000000)
eden space 427008K, 100% used [0x00000000e0000000,0x00000000fa100000,0x00000000fa100000)
from space 42496K, 29% used [0x00000000fce80000,0x00000000fdadb8f0,0x00000000ff800000)
to space 44544K, 0% used [0x00000000fa100000,0x00000000fa100000,0x00000000fcc80000)
ParOldGen total 568320K, used 378022K [0x00000000a0000000, 0x00000000c2b00000, 0x00000000e0000000)
object space 568320K, 66% used [0x00000000a0000000,0x00000000b7129a20,0x00000000c2b00000)
Metaspace used 194759K, capacity 203477K, committed 203776K, reserved 1226752K
class space used 24107K, capacity 25675K, committed 25856K, reserved 1048576K
Event: 4647.589 GC heap after
Heap after GC invocations=81 (full 6):
PSYoungGen total 471552K, used 5596K [0x00000000e0000000, 0x00000000ff800000, 0x0000000100000000)
eden space 427008K, 0% used [0x00000000e0000000,0x00000000e0000000,0x00000000fa100000)
from space 44544K, 12% used [0x00000000fa100000,0x00000000fa6771b8,0x00000000fcc80000)
to space 42496K, 0% used [0x00000000fce80000,0x00000000fce80000,0x00000000ff800000)
ParOldGen total 568320K, used 387928K [0x00000000a0000000, 0x00000000c2b00000, 0x00000000e0000000)
object space 568320K, 68% used [0x00000000a0000000,0x00000000b7ad6260,0x00000000c2b00000)
Metaspace used 194759K, capacity 203477K, committed 203776K, reserved 1226752K
class space used 24107K, capacity 25675K, committed 25856K, reserved 1048576K
}

Deoptimization events (10 events):
Event: 4644.296 Thread 0x00000000181bf800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x000000000948e7bc method=com.android.tools.r8.ir.regalloc.e.a(Ljava/util/Set;Ljava/util/Map;)Z @ 107
Event: 4644.591 Thread 0x00000000181c0800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000007271270 method=com.android.ide.common.blame.SourceFilePosition.equals(Ljava/lang/Object;)Z @ 2
Event: 4644.591 Thread 0x00000000181c0800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000009919614 method=com.google.common.base.Objects.equal(Ljava/lang/Object;Ljava/lang/Object;)Z @ 6
Event: 4644.734 Thread 0x00000000181c1000 Uncommon trap: reason=speculate_class_check action=maybe_recompile pc=0x00000000086b9870 method=com.android.tools.r8.ir.optimize.h.k(Lcom/android/tools/r8/u/b/T;)V @ 237
Event: 4644.759 Thread 0x00000000181b6800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x0000000008f3e734 method=com.google.common.base.Objects.equal(Ljava/lang/Object;Ljava/lang/Object;)Z @ 6
Event: 4644.771 Thread 0x00000000181bf800 Uncommon trap: reason=unstable_if action=reinterpret pc=0x000000000894b728 method=com.android.tools.r8.ir.regalloc.LinearScanRegisterAllocator.b()V @ 1236
Event: 4644.813 Thread 0x00000000181c1000 Uncommon trap: reason=speculate_class_check action=maybe_recompile pc=0x00000000086b9870 method=com.android.tools.r8.ir.optimize.h.k(Lcom/android/tools/r8/u/b/T;)V @ 237
Event: 4645.723 Thread 0x00000000181bf800 Uncommon trap: reason=bimorphic action=maybe_recompile pc=0x0000000008ec36c4 method=com.android.tools.r8.u.a.h.e.a(Lcom/android/tools/r8/u/b/M0;)V @ 75
Event: 4647.398 Thread 0x00000000181bf800 Uncommon trap: reason=array_check action=maybe_recompile pc=0x000000000aa332a0 method=java.util.TimSort.mergeLo(IIII)V @ 133
Event: 4647.399 Thread 0x00000000181bf800 Uncommon trap: reason=array_check action=maybe_recompile pc=0x000000000aa332a0 method=java.util.TimSort.mergeLo(IIII)V @ 133

Classes redefined (0 events):
No events

Internal exceptions (10 events):
Event: 4646.679 Thread 0x00000000181c0800 Exception <a 'sun/nio/fs/WindowsException'> (0x00000000edeee2d0) thrown at [D:\src\AOSP-openjdk-cygwin\jdk8u\hotspot\src\share\vm\prims\jni.cpp, line 710]
Event: 4647.136 Thread 0x00000000181b6800 Exception <a 'sun/nio/fs/WindowsException'> (0x00000000e742e5d0) thrown at [D:\src\AOSP-openjdk-cygwin\jdk8u\hotspot\src\share\vm\prims\jni.cpp, line 710]
Event: 4647.373 Thread 0x00000000181b6800 Exception <a 'sun/nio/fs/WindowsException'> (0x00000000e74b3588) thrown at [D:\src\AOSP-openjdk-cygwin\jdk8u\hotspot\src\share\vm\prims\jni.cpp, line 710]
Event: 4647.385 Thread 0x00000000181b6800 Exception <a 'sun/nio/fs/WindowsException'> (0x00000000f227b568) thrown at [D:\src\AOSP-openjdk-cygwin\jdk8u\hotspot\src\share\vm\prims\jni.cpp, line 710]
Event: 4647.443 Thread 0x00000000181bf800 Exception <a 'sun/nio/fs/WindowsException'> (0x00000000f46bd038) thrown at [D:\src\AOSP-openjdk-cygwin\jdk8u\hotspot\src\share\vm\prims\jni.cpp, line 710]
Event: 4647.545 Thread 0x00000000181b6800 Exception <a 'sun/nio/fs/WindowsException'> (0x00000000f22afcf8) thrown at [D:\src\AOSP-openjdk-cygwin\jdk8u\hotspot\src\share\vm\prims\jni.cpp, line 710]
Event: 4647.547 Thread 0x00000000181b6800 Exception <a 'sun/nio/fs/WindowsException'> (0x00000000f9334eb0) thrown at [D:\src\AOSP-openjdk-cygwin\jdk8u\hotspot\src\share\vm\prims\jni.cpp, line 710]
Event: 4647.613 Thread 0x00000000181bf800 Exception <a 'sun/nio/fs/WindowsException'> (0x00000000e1562d60) thrown at [D:\src\AOSP-openjdk-cygwin\jdk8u\hotspot\src\share\vm\prims\jni.cpp, line 710]
Event: 4647.615 Thread 0x00000000181b6800 Exception <a 'sun/nio/fs/WindowsException'> (0x00000000e17bd450) thrown at [D:\src\AOSP-openjdk-cygwin\jdk8u\hotspot\src\share\vm\prims\jni.cpp, line 710]
Event: 4647.638 Thread 0x00000000181bf800 Exception <a 'sun/nio/fs/WindowsException'> (0x00000000e2dd6b80) thrown at [D:\src\AOSP-openjdk-cygwin\jdk8u\hotspot\src\share\vm\prims\jni.cpp, line 710]

Events (10 events):
Event: 4647.660 Thread 0x00000000181c1000 DEOPT PACKING pc=0x000000000a75059b sp=0x000000002b40aee0
Event: 4647.660 Thread 0x00000000181c1000 DEOPT UNPACKING pc=0x00000000034e75d0 sp=0x000000002b40af48 mode 0
Event: 4647.662 Thread 0x00000000181c1000 DEOPT PACKING pc=0x000000000a7696b5 sp=0x000000002b40b2d0
Event: 4647.662 Thread 0x00000000181c1000 DEOPT UNPACKING pc=0x00000000034e75d0 sp=0x000000002b40b1e0 mode 0
Event: 4647.671 Thread 0x00000000181c0800 DEOPT PACKING pc=0x000000000a769427 sp=0x000000002a0dac10
Event: 4647.671 Thread 0x00000000181c0800 DEOPT UNPACKING pc=0x00000000034e75d0 sp=0x000000002a0dab20 mode 0
Event: 4647.672 Thread 0x00000000181c1000 DEOPT PACKING pc=0x0000000008e2cbdd sp=0x000000002b40aca0
Event: 4647.672 Thread 0x00000000181c1000 DEOPT UNPACKING pc=0x00000000034e75d0 sp=0x000000002b40ab70 mode 0
Event: 4647.673 Thread 0x00000000181c0800 DEOPT PACKING pc=0x000000000a750290 sp=0x000000002a0da820
Event: 4647.673 Thread 0x00000000181c0800 DEOPT UNPACKING pc=0x00000000034e75d0 sp=0x000000002a0da898 mode 0


Dynamic libraries:
0x00007ff771650000 - 0x00007ff771681000 C:\Program Files\android-studio\jre\bin\java.exe
0x00007fff0d7c0000 - 0x00007fff0d9b0000 C:\Windows\SYSTEM32\ntdll.dll
0x00007fff0c100000 - 0x00007fff0c1b2000 C:\Windows\System32\KERNEL32.DLL
0x00007fff0a930000 - 0x00007fff0abd3000 C:\Windows\System32\KERNELBASE.dll
0x00007fff0c220000 - 0x00007fff0c2c3000 C:\Windows\System32\ADVAPI32.dll
0x00007fff0cf10000 - 0x00007fff0cfae000 C:\Windows\System32\msvcrt.dll
0x00007fff0c4a0000 - 0x00007fff0c537000 C:\Windows\System32\sechost.dll
0x00007fff0d150000 - 0x00007fff0d270000 C:\Windows\System32\RPCRT4.dll
0x00007fff0d350000 - 0x00007fff0d4e4000 C:\Windows\System32\USER32.dll
0x00007fff0a850000 - 0x00007fff0a871000 C:\Windows\System32\win32u.dll
0x00007fff0d4f0000 - 0x00007fff0d516000 C:\Windows\System32\GDI32.dll
0x00007fff0b4d0000 - 0x00007fff0b664000 C:\Windows\System32\gdi32full.dll
0x00007fff0b670000 - 0x00007fff0b70e000 C:\Windows\System32\msvcp_win.dll
0x00007fff0b770000 - 0x00007fff0b86a000 C:\Windows\System32\ucrtbase.dll
0x00007ffef6f40000 - 0x00007ffef71c5000 C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.18362.418_none_e6c6b287130d565d\COMCTL32.dll
0x00007fff0b940000 - 0x00007fff0bc76000 C:\Windows\System32\combase.dll
0x00007fff0a750000 - 0x00007fff0a7d0000 C:\Windows\System32\bcryptPrimitives.dll
0x00007fff0d320000 - 0x00007fff0d34e000 C:\Windows\System32\IMM32.DLL
0x0000000050e20000 - 0x0000000050ef2000 C:\Program Files\android-studio\jre\jre\bin\msvcr100.dll
0x00000000777b0000 - 0x0000000077ff6000 C:\Program Files\android-studio\jre\jre\bin\server\jvm.dll
0x00007fff0c2d0000 - 0x00007fff0c2d8000 C:\Windows\System32\PSAPI.DLL
0x00007fff058b0000 - 0x00007fff058ba000 C:\Windows\SYSTEM32\VERSION.dll
0x00007fff08730000 - 0x00007fff08754000 C:\Windows\SYSTEM32\WINMM.dll
0x00007fff07030000 - 0x00007fff07039000 C:\Windows\SYSTEM32\WSOCK32.dll
0x00007fff0c420000 - 0x00007fff0c48f000 C:\Windows\System32\WS2_32.dll
0x00007fff086d0000 - 0x00007fff086fd000 C:\Windows\SYSTEM32\winmmbase.dll
0x00007fff0a800000 - 0x00007fff0a84a000 C:\Windows\System32\cfgmgr32.dll
0x00007fff04850000 - 0x00007fff0485f000 C:\Program Files\android-studio\jre\jre\bin\verify.dll
0x00007ffef9300000 - 0x00007ffef9329000 C:\Program Files\android-studio\jre\jre\bin\java.dll
0x00007fff036b0000 - 0x00007fff036c6000 C:\Program Files\android-studio\jre\jre\bin\zip.dll
0x00007fff0c820000 - 0x00007fff0cf05000 C:\Windows\System32\SHELL32.dll
0x00007fff0d270000 - 0x00007fff0d319000 C:\Windows\System32\shcore.dll
0x00007fff0ad50000 - 0x00007fff0b4cf000 C:\Windows\System32\windows.storage.dll
0x00007fff0a6e0000 - 0x00007fff0a6ff000 C:\Windows\System32\profapi.dll
0x00007fff0a700000 - 0x00007fff0a74a000 C:\Windows\System32\powrprof.dll
0x00007fff0a690000 - 0x00007fff0a6a0000 C:\Windows\System32\UMPDC.dll
0x00007fff0c7c0000 - 0x00007fff0c812000 C:\Windows\System32\shlwapi.dll
0x00007fff0a6a0000 - 0x00007fff0a6b1000 C:\Windows\System32\kernel.appcore.dll
0x00007fff0ad30000 - 0x00007fff0ad47000 C:\Windows\System32\cryptsp.dll
0x00007ffef9140000 - 0x00007ffef915a000 C:\Program Files\android-studio\jre\jre\bin\net.dll
0x00007ffefdca0000 - 0x00007ffefde76000 C:\Windows\SYSTEM32\urlmon.dll
0x00007ffefd2c0000 - 0x00007ffefd566000 C:\Windows\SYSTEM32\iertutil.dll
0x00007fff0a0d0000 - 0x00007fff0a0dc000 C:\Windows\SYSTEM32\CRYPTBASE.DLL
0x00007fff09f00000 - 0x00007fff09f67000 C:\Windows\system32\mswsock.dll
0x00007ffef90a0000 - 0x00007ffef90b3000 C:\Program Files\android-studio\jre\jre\bin\nio.dll
0x00007ffef2380000 - 0x00007ffef23a6000 C:\Users\Administrator\.gradle\native\30\windows-amd64\native-platform.dll
0x00007fff03a10000 - 0x00007fff03a1d000 C:\Program Files\android-studio\jre\jre\bin\management.dll
0x00007fff09a70000 - 0x00007fff09aa3000 C:\Windows\system32\rsaenh.dll
0x00007fff0a7d0000 - 0x00007fff0a7f6000 C:\Windows\System32\bcrypt.dll
0x00007fff0a580000 - 0x00007fff0a5a5000 C:\Windows\SYSTEM32\USERENV.dll
0x00007fff09c10000 - 0x00007fff09c4a000 C:\Windows\SYSTEM32\IPHLPAPI.DLL
0x00007fff0c0f0000 - 0x00007fff0c0f8000 C:\Windows\System32\NSI.dll
0x00007fff05890000 - 0x00007fff058a6000 C:\Windows\SYSTEM32\dhcpcsvc6.DLL
0x00007fff05840000 - 0x00007fff0585c000 C:\Windows\SYSTEM32\dhcpcsvc.DLL
0x00007fff09c50000 - 0x00007fff09d1a000 C:\Windows\SYSTEM32\DNSAPI.dll
0x00007ffef2cb0000 - 0x00007ffef2cd4000 C:\Program Files\android-studio\jre\jre\bin\sunec.dll
0x00007fff039c0000 - 0x00007fff039ca000 C:\Windows\System32\rasadhlp.dll
0x00007fff05120000 - 0x00007fff05197000 C:\Windows\System32\fwpuclnt.dll
0x00007fff02ec0000 - 0x00007fff02ecb000 C:\Program Files\android-studio\jre\jre\bin\sunmscapi.dll
0x00007fff0abe0000 - 0x00007fff0ad29000 C:\Windows\System32\CRYPT32.dll
0x00007fff0a6c0000 - 0x00007fff0a6d2000 C:\Windows\System32\MSASN1.dll
0x00007fff096f0000 - 0x00007fff09721000 C:\Windows\SYSTEM32\ntmarta.dll
0x00007fff08830000 - 0x00007fff088bf000 C:\Windows\system32\apphelp.dll
0x00007fff07180000 - 0x00007fff0719e000 C:\Users\Administrator\AppData\Local\Temp\native-platform2950005020272175531dir\native-platform.dll

VM Arguments:
jvm_args: -Xmx1536m -Dfile.encoding=GBK -Duser.country=CN -Duser.language=zh -Duser.variant
java_command: org.gradle.launcher.daemon.bootstrap.GradleDaemon 5.6.4
java_class_path (initial): C:\Users\Administrator\.gradle\wrapper\dists\gradle-5.6.4-all\ankdp27end7byghfw1q2sw75f\gradle-5.6.4\lib\gradle-launcher-5.6.4.jar
Launcher Type: SUN_STANDARD

Environment Variables:
PATH=C:\Program Files (x86)\NetSarang\Xftp 6\;C:\Program Files (x86)\NetSarang\Xshell 6\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\nodejs\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\Git\cmd;C:\Program Files\dotnet\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;C:\Users\Administrator\AppData\Roaming\npm
USERNAME=Administrator
OS=Windows_NT
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 60 Stepping 3, GenuineIntel



--------------- S Y S T E M ---------------

OS: Windows 10.0 , 64 bit Build 18362 (10.0.18362.329)

CPU:total 4 (initial active 4) (4 cores per cpu, 1 threads per core) family 6 model 60 stepping 3, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, lzcnt, tsc, tscinvbit, bmi1, bmi2

Memory: 4k page, physical 16736456k(4941020k free), swap 18623688k(6080k free)

vm_info: OpenJDK 64-Bit Server VM (25.212-b04) for windows-amd64 JRE (1.8.0_212-release-1586-b04), built by "builder" with MS VC++ 10.0 (VS2010)

time: Wed May 06 15:14:59 2020
timezone: Öйú±ê׼ʱ¼ä
elapsed time: 4647 seconds (0d 1h 17m 27s)


+ 22859
- 0
replay_pid15488.log
Різницю між файлами не показано, бо вона завелика
Переглянути файл


+ 2
- 0
settings.gradle Переглянути файл

@@ -0,0 +1,2 @@
include ':app'
rootProject.name='WebEBook'


Завантаження…
Відмінити
Зберегти