最新消息:20210917 已从crifan.com换到crifan.org

【未解决】Mac中用Android Studio打开rctjsa项目并编译apk和实时调试安卓手机小米9

Android crifan 483浏览 0评论
折腾:
【未解决】寻找安卓中rcsjta的3个app的log日志文件
期间,去安卓的Android Studio中,打开和编译项目rcsjta
然后再去编译3个app的apk
再去连到安卓手机小米9中,实时调试。
看看输出的logcat中的日志如何。尝试找到RCS服务无法启动的原因。
先去用Android Studio打开项目:
开始indexing,建立索引
然后去:
【已解决】Mac中Android Studio下载gradle的zip包速度太慢
不过还没去加速呢,过了很多秒后,下载完毕了?
syncing... 
Running for 4 m 39 s 
Download https://services.gradle.org/distributions/gradle-2.14.1-all.zip
3 m 5 s 255 ms 
Run build 
6 s 515 ms 
Run init scripts 
1 s 465 ms 
Configure settings 
46 ms 
Configure build 
4 s 602 ms 
然后也去弄了:
【未解决】Mac中Android Studio中gradle的库下载速度慢
然后自动编译出错:
【已解决】Android Studio中build编译rcstja项目报错:Could not find method leftShift for arguments on task notification installServiceFirst of type org.gradle.api.DefaultTask
然后又出现其他错误:
【已解决】Android Studio中编译rcsjta报错:ERROR Failed to resolve play-services
然后:
【已解决】Android Studio中编译rcsjta报错:ERROR The minSdk version should not be declared in the android manifest file
然后:
貌似就build成功了?
然后展开左边的的build的详情
发现:Run tasks中有很多task任务
completed successfully 3 s 149 ms
Run build 3 s 80 ms
Load build 2 ms
Evaluate settings 1 ms
Finalize build cache configuration


Configure build 420 ms
Load projects 6 ms
Calculate task graph 120 ms
Run tasks 2 s 532 ms
:api:preBuild 21 ms
:api:preDebugBuild 3 ms
:api:compileDebugAidl 1 s 95 ms
Execute taskAction 869 ms
:cts_provider:preBuild


:cts_provider:preDebugBuild


:cts_provider:compileDebugAidl


:api:packageDebugRenderscript


:cts_provider:compileDebugRenderscript


:cts_provider:checkDebugManifest 3 ms
:cts_provider:generateDebugBuildConfig 20 ms
:cts_provider:prepareLintJar 4 ms
:cts_provider:prepareLintJarForPublish 118 ms
:tts:preBuild 2 ms
:tts:preDebugBuild


:tts:compileDebugAidl


:tts:compileDebugRenderscript 58 ms
:tts:checkDebugManifest 3 ms
:tts:generateDebugBuildConfig 10 ms
:tts:prepareLintJar 2 ms
:tts:prepareLintJarForPublish 99 ms
:cts_provider:generateDebugSources 1 ms
:provisioning:preBuild 1 ms
:provisioning:preDebugBuild


:provisioning:compileDebugAidl


:provisioning:compileDebugRenderscript 47 ms
:provisioning:checkDebugManifest 3 ms
:provisioning:generateDebugBuildConfig 8 ms
:provisioning:prepareLintJar 2 ms
:provisioning:prepareLintJarForPublish 152 ms
:api:compileDebugRenderscript


:api:checkDebugManifest 2 ms
:api:generateDebugBuildConfig 8 ms
:api:prepareLintJar 2 ms
:api:prepareLintJarForPublish 1 s 76 ms
:tts:generateDebugSources 1 ms
:bouncycastle:preBuild 1 ms
:bouncycastle:preDebugBuild


:bouncycastle:compileDebugAidl


:bouncycastle:compileDebugRenderscript 91 ms
:bouncycastle:checkDebugManifest 3 ms
:bouncycastle:generateDebugBuildConfig 7 ms
:bouncycastle:prepareLintJar 2 ms
:bouncycastle:prepareLintJarForPublish 4 ms
:provisioning:generateDebugSources 1 ms
:bouncycastle:generateDebugSources


:api_cnx:preBuild 1 ms
:api_cnx:preDebugBuild


:api_cnx:compileDebugAidl


:api_cnx:compileDebugRenderscript


:api_cnx:checkDebugManifest 4 ms
:api_cnx:generateDebugBuildConfig 8 ms
:api_cnx:prepareLintJar 2 ms
:api_cnx:prepareLintJarForPublish 5 ms
:notification:preBuild 1 ms
:api_cnx:generateDebugSources 1 ms
:notification:preDebugBuild


:notification:compileDebugAidl


:notification:compileDebugRenderscript 18 ms
:notification:checkDebugManifest 2 ms
:notification:generateDebugBuildConfig 7 ms
:notification:prepareLintJar 1 ms
:notification:prepareLintJarForPublish 920 ms
:core:preBuild 1 ms
:core:preDebugBuild


:nist_sip:preBuild


:nist_sip:preDebugBuild


:nist_sip:compileDebugAidl


:core:compileDebugAidl


:bouncycastle:packageDebugRenderscript


:nist_sip:packageDebugRenderscript


:core:compileDebugRenderscript 292 ms
:core:checkDebugManifest 3 ms
:core:generateDebugBuildConfig 6 ms
:core:prepareLintJar 1 ms
:core:prepareLintJarForPublish 4 ms
:cts_signature:preBuild


:core:generateDebugSources


:cts_signature:preDebugBuild 1 ms
:cts_signature:compileDebugAidl


:cts_signature:compileDebugRenderscript


:cts_signature:checkDebugManifest 2 ms
:cts_signature:generateDebugBuildConfig 6 ms
:cts_signature:prepareLintJar 2 ms
:cts_signature:prepareLintJarForPublish 269 ms
:nist_sip:compileDebugRenderscript 167 ms
:nist_sip:checkDebugManifest 3 ms
:nist_sip:generateDebugBuildConfig 27 ms
:nist_sip:prepareLintJar 2 ms
:nist_sip:prepareLintJarForPublish 111 ms
:mediaplayer:preBuild


:mediaplayer:preDebugBuild


:mediaplayer:compileDebugAidl


:mediaplayer:compileDebugRenderscript 38 ms
:mediaplayer:checkDebugManifest 2 ms
:mediaplayer:generateDebugBuildConfig 6 ms
:mediaplayer:prepareLintJar 2 ms
:mediaplayer:prepareLintJarForPublish 274 ms
:cts_signature:generateDebugSources


:extension:preBuild 1 ms
:extension:preDebugBuild


:extension:compileDebugAidl


:extension:compileDebugRenderscript 7 ms
:extension:checkDebugManifest 2 ms
:extension:generateDebugBuildConfig 8 ms
:extension:prepareLintJar 1 ms
:extension:prepareLintJarForPublish 221 ms
:nist_sip:generateDebugSources


:RI:preBuild


:RI:preDebugBuild


:RI:compileDebugAidl


:api_cnx:packageDebugRenderscript


:mediaplayer:packageDebugRenderscript


:RI:compileDebugRenderscript 148 ms
:RI:checkDebugManifest 3 ms
:RI:generateDebugBuildConfig 8 ms
:RI:prepareLintJar 2 ms
:RI:prepareLintJarForPublish 5 ms
:api:generateDebugSources


:settings:preBuild 1 ms
:RI:generateDebugSources 1 ms
:settings:preDebugBuild


:settings:compileDebugAidl


:settings:compileDebugRenderscript 13 ms
:settings:checkDebugManifest 3 ms
:settings:generateDebugBuildConfig 6 ms
:settings:prepareLintJar 1 ms
:settings:prepareLintJarForPublish 4 ms
:extension:generateDebugSources 1 ms
:settings:generateDebugSources 1 ms
:notification:generateDebugSources


:mediaplayer:generateDebugSources


null


The specified Android SDK Build Tools version (24.0.0) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.5.2.


Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.


Configuration 'androidTestCompile' is obsolete and has been replaced with 'androidTestImplementation'.


Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.


Configuration 'androidTestCompile' is obsolete and has been replaced with 'androidTestImplementation'.


Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.


The specified Android SDK Build Tools version (24.0.0) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.5.2.
不过貌似没有看到之前
【已解决】Android Studio中编译rcsjta报错:ERROR Failed to resolve play-services
中注意到的
task installServiceFirst(dependsOn: ':core:installDebug') {
    doLast {
        println 'RCS core service was installed first!'
    }
}
中的:
:core:installDebug
的task?
有点奇怪,需要后续确认,是否是个问题
如果是问题,或许就是却这个 导致RCS服务没有启动?
另外也看到,很多黄色警告:
感觉最好去解决掉比较好:
【已解决】Android Studio编译rcsjta出现gradle警告:The specified Android SDK Build Tools version is ignored
然后此处竟然:其他几个黄色的,也变成了蓝色,好像没有警告了:
不过也分别去看看:
【已解决】Android Studio编译rcsjta出现gradle警告:Configuration compile is obsolete and has been replaced with implementation and api It will be removed soon
其他类似的:
INFO: Configuration 'androidTestCompile' is obsolete and has been replaced with 'androidTestImplementation'.
It will be removed soon. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
Affected Modules: cts_provider, cts_signature
然后也点击去修改。

最后终于没有警告了:
然后希望重新编译,看看是否还有其他问题
找到一个:
Rebuild Project
估计可以:
2020-08-03
17:58    Executing tasks: [clean, :cts_provider:assembleDebug, :tts:assembleDebug, :provisioning:assembleDebug, :api:assembleDebug, :bouncycastle:assembleDebug, :api_cnx:assembleDebug, :notification:assembleDebug, :core:assembleDebug, :cts_signature:assembleDebug, :nist_sip:assembleDebug, :mediaplayer:assembleDebug, :extension:assembleDebug, :RI:assembleDebug, :settings:assembleDebug] in project /Users/xxx/dev/xxx/RCS/rcsjta
此处task很多:
结果报错:
【已解决】Android Studio重新编译rctjsa报错:duplicate entry META-INF/MANIFEST.MF
此时所有编译的警告都解决了。
接下来去解决其他地方看到的警告:
【已解决】Android Studio中gradle提示:Android Studio is using this JDK location which is different to what Gradle uses by default

继续:
【未解决】Android Studio中Project Structure提示错误:rootProject.compileSdkVersion Unresolved reference Resolved android-23

然后想办法,用Android Studio去编译出apk,且连接安卓手机小米9去安装和调试。

点击虚拟机管理:
不过此处没连小米9真机。
先去USB数据线连上Mac
注:之前就见到授权弹框:
之前已点击确定
先确保adb能检测到设备
~  adb devices
List of devices attached
8c8a4d4d    device
此处能检测到。
另外,确保此处apk都生成了:
RI的是有了apk。
core的也有了apk。
settings也有了apk
然后去:
【未解决】用Android Studio连接安卓真机小米9去安装调试apk

转载请注明:在路上 » 【未解决】Mac中用Android Studio打开rctjsa项目并编译apk和实时调试安卓手机小米9

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
93 queries in 0.197 seconds, using 23.38MB memory