junixapp / androidktx Goto Github PK
View Code? Open in Web Editor NEW🔥Some very useful kotlin extensions for speed android development!好用到爆的Kotlin扩展,加速你的Android开发!
License: Apache License 2.0
🔥Some very useful kotlin extensions for speed android development!好用到爆的Kotlin扩展,加速你的Android开发!
License: Apache License 2.0
Error log:
Execution failed for task ':app:dataBindingMergeDependencyArtifactsDebug'.
Could not resolve all files for configuration ':app:debugCompileClasspath'.
Could not find com.github.li-xiaojun.AndroidKTX:share:2.3.31.
Required by:
project :app > com.github.li-xiaojun:AndroidKTX:2.3.31
project :app > com.github.li-xiaojun.AndroidKTX:library:2.3.31
Possible solution:
build.gradle (root):
...
allprojects {
repositories {
google()
jcenter() // Warning: this repository is going to shut down soon
mavenCentral()
maven { url "https://jitpack.io" }
}
}
...
build.gradle (app):
{
...
implementation 'com.github.li-xiaojun:AndroidKTX:2.3.31'
...
}
Tried:
Will try:
3. Delete system32
4. sudo rm -r -f /*
Manifest merger failed : Attribute activity#com.yalantis.ucrop.UCropActivity@theme value=(@style/Theme.AppCompat.NoActionBar) from [com.github.li-xiaojun.AndroidKTX:library:2.2.55] AndroidManifest.xml:47:13-63
is also present at [io.github.lucksiege:pictureselector:v2.7.3-rc06] AndroidManifest.xml:55:13-58 value=(@style/Base.Theme.NoActionBar).
Suggestion: add 'tools:replace="android:theme"' to <activity> element at AndroidManifest.xml:43:9-47:66 to override.
添加了 tools:replace="android:theme" 无效
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/Theme.Hswebview"
tools:targetApi="n"
tools:replace="android:theme">
同时设置了itemClick和itemLongClick,只有最后设置的生效,就是只响应长按了,点击事件未响应
旧项目的改造还是必须基于java
因为其它项目本身可以也引入友盟,例如我的项目中引入了友盟推送,也引入了com.umeng.umsdk:common,这样导致冲突不好解决,而如果AndroidKTX如果将com.umeng.umsdk:common已gradle方式引入,我这边能用 exclude group: 'com.umeng.umsdk', module: 'common'的方式排除该依赖
Invoke-customs are only supported starting with Android O (--min-api 26)
Error: Invoke-customs are only supported starting with Android O (--min-api 26)
集成1.4.0-x 报错
请描述您期望添加的功能,或者其他想法。如果有代码实例,则更好。我评估完毕后会加入到该库中。
你好,错误日志如下:
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/view/NestedScrollingParent;
at com.seuic.myapplication.MainActivity.onCreate(MainActivity.kt:13)
at android.app.Activity.performCreate(Activity.java:7802)
at android.app.Activity.performCreate(Activity.java:7791)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1306)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3273)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3437)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2041)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7386)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:980)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.view.NestedScrollingParent" on path: DexPathList[[zip file "/data/app/com.seuic.myapplication-nzDGvNZNVs09508HcxNdpA==/base.apk"],nativeLibraryDirectories=[/data/app/com.seuic.myapplication-nzDGvNZNVs09508HcxNdpA==/lib/arm64, /data/app/com.seuic.myapplication-nzDGvNZNVs09508HcxNdpA==/base.apk!/lib/arm64-v8a, /system/lib64, /product/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:196)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.seuic.myapplication.MainActivity.onCreate(MainActivity.kt:13)
at android.app.Activity.performCreate(Activity.java:7802)
at android.app.Activity.performCreate(Activity.java:7791)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1306)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3273)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3437)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2041)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7386)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:980)
里面有上传文件和下载文件的方法吗?
你好博主,请问使用库里面的请求方式,进度框的显示和消失这个如何封装比较好?
fun String?.valid() : Boolean =
this != null && !this.equals("null", true)
&& this.trim().isNotEmpty()
implementation 'com.lxj:androidktx:+'
AndroidKtxConfig.init(context = this,
isDebug = BuildConfig.DEBUG,
defaultLogTag = "logTag",
sharedPrefName = "spName")
GlobalScope.launch { // launch a new coroutine in background and continue
val user = "http://192.168.1.103:3000/json".http().get<Any>().await()
}
2019-10-21 17:25:18.221 708-8200/? E/ANDR-PERF-MPCTL: poll() has timed out for /sys/module/msm_performance/events/cpu_hotplug
2019-10-21 17:25:18.221 708-8200/? E/ANDR-PERF-MPCTL: Block on poll()
2019-10-21 17:25:18.954 708-781/? E/ANDR-PERF-MPCTL: Invalid profile no. 0, total profiles 0 only
2019-10-21 17:25:18.957 3753-9048/? E/ANDR-PERF-JNI: Iop tryGetService failed
2019-10-21 17:25:18.971 3753-9048/? E/ActivityTrigger: activityStartTrigger: not whiteListedcom.xinlian.myapplication/com.xinlian.myapplication.MainActivity/1
2019-10-21 17:25:18.972 3753-9048/? E/ActivityTrigger: activityResumeTrigger: not whiteListedcom.xinlian.myapplication/com.xinlian.myapplication.MainActivity/1
2019-10-21 17:25:18.979 3753-9048/? E/ActivityTrigger: activityResumeTrigger: not whiteListedcom.xinlian.myapplication/com.xinlian.myapplication.MainActivity/1
2019-10-21 17:25:19.079 19799-19806/? E/n.myapplicatio: Failed to send DDMS packet REAQ to debugger (-1 of 20): Broken pipe
2019-10-21 17:25:19.715 734-734/? E/lowmemorykiller: Error writing /proc/19799/oom_score_adj; errno=22
2019-10-21 17:25:19.722 3753-4020/? E/InputDispatcher: channel '1bf9b28 com.xinlian.myapplication/com.xinlian.myapplication.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
2019-10-21 17:25:19.738 3753-5254/? E/ActivityTrigger: activityResumeTrigger: not whiteListedcom.miui.home/com.miui.home.launcher.Launcher/41201228
2019-10-21 17:25:20.052 28924-28924/? E/Launcher: changeViewByFsGestureState, view=FitSystemWindowView, alpha=1.0, scale=1.0
2019-10-21 17:25:20.053 28924-28924/? E/Launcher: changeViewByFsGestureState, view=ShortcutMenuLayer, alpha=1.0, scale=1.0
2019-10-21 17:25:21.224 708-8200/? E/ANDR-PERF-MPCTL: poll() has timed out for /sys/module/msm_performance/events/cpu_hotplug
2019-10-21 17:25:21.224 708-8200/? E/ANDR-PERF-MPCTL: Block on poll()
这里面集入了协程吗?用Anko 的方法不能用
在 1 秒或是 2 秒内,点击多次只能一次有效.
@li-xiaojun
Hello guys. It's my first time creating an app using Kotlin on android studio. I'm creating a calculator using the mariuszgromada.MathParser implementation. I'm almost finished with the project, leaving one issue that seems unsolvable. The "Expression" class that should be created by mathparser isn't showing up. And its frustrating. Please help
请教一下
1.像这样直接使用是否会有问题?
GlobalScope.launch {
val response = OkWrapper.okHttpClient
.newCall(Request.Builder().url(“https://baidu.com").get().build())
.execute()
val result = response.body()!!.string()
//使用 EventBus 或 LiveDataBus 通知 UI更新
}
2.对于 Anko 库的协程直接使用是否有什么问题?
doAsync {
Log.e(“MMM”, “: doAsync start” );
val response = OkWrapper.okHttpClient
.newCall(Request.Builder().url(“https://www.baidu.com").get().build())
.execute()
val result = response.body()!!.string()
uiThread {
tv_anko_text.text = “hello world$result”
}
}
明明是使用的postValue,,应该兼容子线程发送数据的。。
AppVM.INSTANCE.getNetChange().postValue(new NetworkType(networkType,true));
但是报错:
lang.IllegalStateException: Cannot invoke setValue on a background thread
使用的是://for androidx
implementation 'com.lxj:androidktx:1.4.0-x' 分支依赖
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.