亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

“無法解析以下類的超類型。” 在任務中:應用程序:buildInfoGeneratorDebug

“無法解析以下類的超類型。” 在任務中:應用程序:buildInfoGeneratorDebug

呼啦一陣風 2023-04-13 14:27:22
我無法編譯我的 Android Kotlin 項目,因為在 gradle 編譯時出現以下“Kotlin 編譯器”錯誤:Supertypes of the following classes cannot be resolved. Please make sure you have the required dependencies in the classpath: class sensor_msgs.CompressedImage, unresolved supertypes: org.ros.internal.message.Message> Task:app:buildInfoGeneratorDebug這是一個簡單的測試項目,只有最少的代碼。常規 android 應用程序之間的主要區別。這是我的 MainActivity 使用類 RosActivity 而不是 AppCompatActivity。我已經更改了'ext.kotlin_version'(無法解析以下類的超類型。請確保您在類路徑中具有所需的依賴項:)我嘗試更改依賴項的順序(錯誤:無法解析以下類的超類型。請確保您在類路徑中具有所需的依賴項)我試過'resolutionStrategy.force'(錯誤:無法解析以下類的超類型。請確保您在類路徑中具有所需的依賴項)我試過“無效緩存/重新啟動”(錯誤:無法解析以下類的超類型。請確保您在類路徑中具有所需的依賴項)我更改了 'org.jetbrains.kotlin:kotlin' 但這沒有用(無法解析以下類的超類型)清單.xml:<?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.company.roscameratest">    <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/AppTheme" tools:replace="android:icon">        <activity android:name=".MainActivity">            <intent-filter>                <action android:name="android.intent.action.MAIN"/>                <category android:name="android.intent.category.LAUNCHER"/>            </intent-filter>        </activity>        <activity android:name="org.ros.android.MasterChooser" />        <service android:name="org.ros.android.NodeMainExecutorService" >            <intent-filter>                <action android:name="org.ros.android.NodeMainExecutorService" />            </intent-filter>        </service>    </application></manifest>
查看完整描述

1 回答

?
慕碼人8056858

TA貢獻1803條經驗 獲得超6個贊

在gradle中,如果你的項目實現了A,但是A也實現了B。如果你的項目使用了A中的某個類,擴展了B中的類,你可以只調用構造方法,不能調用B中調用superClass的方法,或者使用它方法參數。

只是嘗試實現api。

api 'org.ros.android_core:android_15:0.3.3'


查看完整回答
反對 回復 2023-04-13
  • 1 回答
  • 0 關注
  • 396 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號