タグ付けされた質問 「android-studio-2.2」

7
サポートされていないメソッド:プロジェクトの実行中のAndroidProject.getPluginGeneration()
Android Studio 2.2でプロジェクトを実行しようとしていますが、このエラーが発生します Unsupported method: AndroidProject.getPluginGeneration(). The version of Gradle you connect to does not support that method. バターナイフ8.4.0を使用しています。 私のアプリgradle.file: buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.2.0' classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' } } 私のモジュールgradleファイル: apply plugin: 'com.android.application' apply plugin: 'android-apt' android { compileSdkVersion 23 buildToolsVersion "23.0.3" defaultConfig { applicationId …

7
警告:Androidコンテキストクラスを静的フィールドに配置しないでください。これはメモリリークです(また、インスタント実行が中断されます)
Android Studio: Androidコンテキストクラスを静的フィールドに配置しないでください。これはメモリリークです(また、インスタント実行が中断されます) だから2つの質問: #1startServiceコンテキストの静的変数なしで静的メソッドからをどのように呼び出すのですか? #2静的メソッド(同じ)からlocalBroadcastをどのように送信しますか? 例: public static void log(int iLogLevel, String sRequest, String sData) { if(iLogLevel > 0) { Intent intent = new Intent(mContext, LogService.class); intent.putExtra("UPDATE_MAIN_ACTIVITY_VIEW", "UPDATE_MAIN_ACTIVITY_VIEW"); mContext.startService(intent); } } または Intent intent = new Intent(MAIN_ACTIVITY_RECEIVER_INTENT); intent.putExtra(MAIN_ACTIVITY_REQUEST_FOR_UPDATE, sRequest)); intent.putExtra(MAIN_ACTIVITY_DATA_FOR_VIEW, sData); intent.putExtra(MAIN_ACTIVITY_LOG_LEVEL, iLogLevel); LocalBroadcastManager.getInstance(mContext).sendBroadcast(intent); 使用せずにこれを行う正しい方法は何でしょうmContextか? 注:私の主な質問は、呼び出し元のメソッドが存在するクラスにコンテキストを渡す方法かもしれないと思います。
弊社のサイトを使用することにより、あなたは弊社のクッキーポリシーおよびプライバシーポリシーを読み、理解したものとみなされます。
Licensed under cc by-sa 3.0 with attribution required.