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

AndroidはGoogleのモバイルオペレーティングシステムであり、デジタルデバイス(スマートフォン、タブレット、自動車、TV、Wear、Glass、IoT)のプログラミングまたは開発に使用されます。Androidに関連するトピックについては、android-intent、android-activity、android-adapterなどのAndroid固有のタグを使用します。開発やプログラミング以外の質問で、Androidフレームワークに関連する質問については、次のリンクを使用してください:https:// android.stackexchange.com。

3
Android Q ffmpegを使用して権限が拒否されました ":エラー= 13、権限が拒否されました
ffmpegを使用してRTSPビデオからフレームを取得したい。しかし、上記のandroid 10の場合、次のようなエラーが発生します。 E/FFmpeg: Exception while trying to run: [Ljava.lang.String;@55e447f java.io.IOException: Cannot run program "/data/user/0/com.example.downloadimagefromurl/files/ffmpeg": error=13, Permission denied at java.lang.ProcessBuilder.start(ProcessBuilder.java:1050) at java.lang.Runtime.exec(Runtime.java:698) at java.lang.Runtime.exec(Runtime.java:563) at com.github.hiteshsondhi88.libffmpeg.ShellCommand.run(ShellCommand.java:10) at com.github.hiteshsondhi88.libffmpeg.FFmpegExecuteAsyncTask.doInBackground(FFmpegExecuteAsyncTask.java:38) at com.github.hiteshsondhi88.libffmpeg.FFmpegExecuteAsyncTask.doInBackground(FFmpegExecuteAsyncTask.java:10) at android.os.AsyncTask$3.call(AsyncTask.java:378) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:289) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:919) Caused by: java.io.IOException: error=13, Permission denied at java.lang.UNIXProcess.forkAndExec(Native Method) …

5
MaterialCardViewがmaterial:1.1.0でクラッシュする
cardviewレイアウトとしてMaterialCardViewを使用しています。Android-studioは、現在のの代わりに implementation "com.google.android.material:material:1.0.0"、1.1.0 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/edit_name" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center" android:orientation="vertical" android:layout_margin="@dimen/activity_vertical_margin"> <com.google.android.material.card.MaterialCardView android:layout_width="match_parent" android:layout_height="wrap_content" app:cardCornerRadius="8dp" app:cardElevation="8dp"> <...more layout> </com.google.android.material.card.MaterialCardView> </LinearLayout> 1.1.0では、クラッシュします Error inflating class com.google.android.material.card.MaterialCardView だから、私は3つのケースがあります: 固執し1.0.0て使用するMaterialCardView(動作するが、推奨されない) 1.1.0(または1.2.0-alpha)に更新して使用androidx.CardView(機能するが、推奨されない) を更新し1.1.0て変更しますMaterialCardView(推奨されますが、機能しません) オプション#3で進みたいのですが、解決策がないので、誰かが手掛かりを与えることができますか? 私のスタイルを更新します(私はスタイルとスタイル-ナイトも持っています。ここでは私styleだけが投稿しています): <resources> <!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.DayNight"> <!-- Customize your theme here. --> <item name="colorPrimary">@color/colorPrimary</item> <item …

3
Android APIv29 FileNotFoundException EACCES(アクセスが拒否されました)
targetSdkVersion v29用にビルドするときにストレージにアクセスできません。 これが私のgradle設定です: compileSdkVersion 29 buildToolsVersion "29.0.2" ... minSdkVersion 15 targetSdkVersion 29 WRITE_EXTERNAL_STORAGE許可が付与され、のビルド時に同じ設定が正常に機能することに注意してくださいtargetSdkVersion 28。 これが私の実装です: val outputFolder = File(baseFolder + File.separator + "Output Folder") if (!outputFolder.exists()) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) { Files.createDirectory(outputFolder.toPath()) //This allways returns false with targetSdkVersion 29 } else { if (!outputFolder.mkdirs()) { Log.e("SaveRaw", "Unable to create …

1
ContextCompat.getColor()はNightModeを無視します
TL、DR; ContextCompat.getColor() 夜の色は使用しません(values-night/colors.xmlナイトモードが有効になっている場合)を。 ここに問題があります: 皆さんこんにちは、 Androidアプリにダークテーマを実装しているので、これを呼び出して有効にします。 AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES); 私は色を設定しvalues/colors.xml、そこに暗いバージョンがありますvalues-night/colors.xmlます。色はnightModeに応じてよく変化しますが、 を使用するContextCompat.getColor(getApplicationContext(), R.id.myColor)と、通常の色(values/colors.xml)が使用され、夜の色(values-night/colors.xml)。 私ではbuild.gradle、これらを設定しました: implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.core:core-ktx:1.2.0-beta01' 誰かが私が間違っていることを教えてもらえますか? PS:私はすでに次の質問を見ました、そしてそれはこの問題に答えません/programming/57779661/contextcompat-getcolor-method-ignores-night-mode

1
Android DataBinding KAPTインクリメンタルサポート
私はこの答えとこのサイトで他の人を見て、Googleを使用しましたが、この問題に有効な答えをまだ見つけていません。これは、KAPTの最新バージョンでリストされている残りの非インクリメンタルアノテーションプロセッサです。 Incremental annotation processing requested, but support is disabled because the following processors are not incremental: android.databinding.annotationprocessor.ProcessDataBinding (NON_INCREMENTAL) AndroidXに移行し、AGP 3.4.1(AGP 3.5.xにアップグレードできません)とGradle 5.5を使用していることに注意してください。どんな助けでも大歓迎です。

4
java.lang.NoSuchMethodError:静的メソッドはありませんisAtLeastR()Z
アプリは正常に動作していましたが、突然このエラーが発生し始めました java.lang.NoSuchMethodError:クラスLandroidx / core / os / BuildCompat;に静的メソッドisAtLeastR()Zはありません。またはそのスーパークラス(「androidx.core.os.BuildCompat」の宣言は/data/app/com.app.goflatmates-RZKwS2h6hav==/base.apkにあります)のcom.google.android.gms.common.util。 PlatformVersion.isAtLeastR(com.google.android.gms:play-services-basement @@ 17.2.0:21)at com.google.android.gms.common.api.GoogleApi.zaa(com.google.android.gms: play-services-base @@ 17.2.0:128)com.google.android.gms.common.api.GoogleApi。(com.google.android.gms:play-services-base @@ 17.2.0:23)でcom.google.android.gms.common.api.GoogleApi。(com.google.android.gms:play-services-base @@ 17.2.0:54)at com.google.android.gms.auth.api。 signin.GoogleSignInClient。(Unknown Source:3)at com.google.android.gms.auth.api.signin。 問題はこの行に来ています GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) .requestEmail() .build(); mGoogleSignInClient = GoogleSignIn.getClient(this, gso);

6
Instagramフィードで意図の問題を共有する
URLの画像を共有するアプリがあります。Androidの最新アップデートで、Instagramフィードで画像を共有したいときに、Instagramから「画像を読み込めません」というメッセージが表示されました。 しかし、私はイメージストーリー、ダイレクトメッセージ、およびどこでも共有できます...この問題はInstagramフィードでのみ発生しています。 public void onShareItemOreo() { // Get access to bitmap image from view imageView = (ImageView) findViewById(R.id.thumbnail); // Get access to the URI for the bitmap Uri bmpUri = prepareShareIntent(imageView); if (bmpUri != null) { //outfile is the path of the image stored in the gallery // Construct a …

2
コード生成に使用されるANTLRツールバージョン4.7.1が現在のランタイムバージョン4.5.3と一致しない
現在DSLと一部のライブラリを使用しているAndroidアプリで作業していると、突然、ビルドでこのエラーが発生しました。 タスクの生成:app:kaptDebugKotlin FAILED ANTLRツールバージョン4.7.1がコード生成に使用されていますが、現在のランタイムバージョン4.5.3と一致していません例外。 何が悪かったのか: タスク ':app:kaptDebugKotlin'の実行に失敗しました。org.jetbrains.kotlin.gradle.internal.KaptExecution java.lang.reflect.InvocationTargetExceptionの実行中にエラーが発生しました(エラーメッセージなし) 私は探していましたが、成功しませんでした... 問題を確認したい場合は、プロジェクトを複製できます。 Android Studio Canary 4.1を使用したGITHUB Imのプロジェクト。 ありがとう。
8 android  kotlin 

1
Windows 10にsdkmanagerをインストールできない
Eclipseで使用するために、sdkマネージャーを単独でインストールしようとしています。グーグルが提供するzipファイルをダウンロードしました- commandlinetools-win-6200805_latest.zip から https://developer.android.com/studio しかし、sdkmanager.batファイルを実行しようとすると、実行されず、次のエラーが発生します。 Error: could not find or load main class com.android.sdklib.tool.sdkmanager.SdkManagerCli Java jdkパスが適切に設定されており、それに関するエラーはないことに注意してください。 batファイルを確認したい場合は、次のとおりです。 @if "%DEBUG%" == "" @echo off @rem ########################################################################## @rem @rem sdkmanager startup script for Windows @rem @rem ########################################################################## @rem Set local scope for the variables with windows NT shell if "%OS%"=="Windows_NT" setlocal set …

5
警告ダイアログのsetcancelableがfalseの場合、backpressedで機能しない
AlertDialogがありますsetCancelable()が、これは誤りです。でOnbackpressed機能私はAlertDialogを閉じることにしたいです。しかし、setCancelable()がfalseの場合、戻るキーはまったく機能しません。この問題を取り除くにはどうすればよいですか?setCancelable()別の問題が発生するため、true に変更したくありません。 import android.os.Bundle import android.widget.Toast import androidx.appcompat.app.AlertDialog import androidx.appcompat.app.AppCompatActivity class MainActivity : AppCompatActivity() { lateinit var dialogBuilder: AlertDialog.Builder override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) dialogBuilder = AlertDialog.Builder(this) dialogBuilder.setMessage("Check your internet connection") .setPositiveButton("OK") { _, _ -> Toast.makeText(this, "OK", Toast.LENGTH_LONG).show() }.setCancelable(false) .create().show() } }

1
install_referrerインテントの廃止とライブラリの更新
Googleからメールを受け取りました: 最近、install_referrerインテントブロードキャストメカニズムを廃止することを発表しました。1つ以上のアプリがこのインテントを使用して参照を追跡するため、2020年3月1日までに切り替えを確実に行う必要がありました。この日以降、新しいバージョンのPlayストアアプリは、アプリのインストール後にinstall_referrerインテントをブロードキャストしなくなります。 Stack:install_referrer intent deprecationでこの回答を確認し、Firebaseライブラリの更新を待つというアドバイスに従って、プロジェクトを最新バージョンに更新しましたが、package = "com.google.firebase。 Measurement_impl " <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.google.firebase.measurement_impl" > <uses-sdk android:minSdkVersion="14" /> <!-- Required permission for App measurement to run. --> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.WAKE_LOCK" /> <uses-permission android:name="com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE" /> <application> <receiver android:name="com.google.android.gms.measurement.AppMeasurementInstallReferrerReceiver" android:enabled="true" android:exported="true" android:permission="android.permission.INSTALL_PACKAGES" > <intent-filter> <action android:name="com.android.vending.INSTALL_REFERRER" /> </intent-filter> </receiver> …

4
カスタムUnity Androidプラグインで非静的メソッドを呼び出す
私は自分のAndroid用Androidプラグインを構築する方法を理解しようとしています。 Javaクラス(AndroidStudioで作成されたクラス)で静的メソッドを呼び出すことはできましたが、非静的メソッドを呼び出すことはできません。 私はそれらのリンクをチェックします: https://answers.unity.com/questions/884503/cant-call-non-static-method-in-androidjavaclass.html http://leoncvlt.com/blog/a-primer-on-android-plugin-development-in-unity/ https://answers.unity.com/questions/1327186/how-to-get-intent-data-for-unity-to-use.html Unity Androidプラグインから非静的メソッドを呼び出す方法は? しかし、どれも機能しません。 Unityのボタンから次のように呼び出しを取得しようとしています: AndroidJavaClass UnityPlayer = new AndroidJavaClass("com.unity3d.player.UnityPlayer"); AndroidJavaObject currentActivity = UnityPlayer.Get<AndroidJavaObject>("currentActivity"); currentActivity.Call("SayHi"); Androidでの私の活動は次のようになります。 public class MainActivity extends UnityPlayerActivity { private static final String TAG = "LibraryTest"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Log.d(TAG, "Created!"); } public void SayHi() { Log.d(TAG, "HI_"); …
8 java  c#  android  unity3d  plugins 

1
Androidでjava.lang.NullPointerExceptionを取得する
ndkのクラッシュにFirebase crashlyticsベータ版を使用しています。ここに記載されているすべての手順に従います。しかし、問題が発生し、シンボルファイルをアップロードできません。私がタスクを実行しようとするときはいつでも./gradlew uploadCrashlyticsSymbolFileDebug --stacktraceそれは言うjava.lang.NullPointerException。しかし、なぜ、どこでnullになるのでしょうか。 これがこのタスクの完全なスタックトレースです > Task :app:generateCrashlyticsSymbolFileDebug FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:generateCrashlyticsSymbolFileDebug'. > java.lang.NullPointerException (no error message) * Try: Run with --info or --debug option to get more log output. Run with --scan to get full insights. * …

2
チャットモデルのルームエンティティ間の1対多の関係を定義する
Roomデータベースの使用を開始し、ルームエンティティを作成するためにいくつかのドキュメントを調べました。これらは私の関係です。チャットチャネルは多くの会話を持つことができます。したがって、これは1対多の関係になります。したがって、以下のようにエンティティを作成しました。 チャネルエンティティ @Entity(primaryKeys = ["channelId"]) @TypeConverters(TypeConverters::class) data class Channel( @field:SerializedName("channelId") val channelId: String, @field:SerializedName("channelName") val channelName: String, @field:SerializedName("createdBy") val creationTs: String, @field:SerializedName("creationTs") val createdBy: String, @field:SerializedName("members") val members: List<String>, @field:SerializedName("favMembers") val favMembers: List<String> ) { // Does not show up in the response but set in post processing. var isOneToOneChat: …

4
フラグメントを切り替えるときのジャンプスクロール
ScrollViewの内部では、高さが異なる2つのフラグメントを動的に切り替えています。残念ながらそれはジャンプにつながります。次のアニメーションで確認できます。 「黄色を表示」ボタンに到達するまでスクロールダウンしています。 「黄色を表示」を押すと、巨大な青いフラグメントが小さな黄色のフラグメントに置き換えられます。これが発生すると、両方のボタンが画面の最後にジャンプします。 黄色のフラグメントに切り替えたときに、両方のボタンが同じ位置に留まるようにします。どうすればできますか? https://github.com/wondering639/stack-dynamiccontentで入手可能なソースコードそれぞれhttps://github.com/wondering639/stack-dynamiccontent.git 関連するコードスニペット: activity_main.xml <?xml version="1.0" encoding="utf-8"?> <androidx.core.widget.NestedScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/myScrollView" android:layout_width="match_parent" android:layout_height="match_parent"> <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" android:layout_height="match_parent" tools:context=".MainActivity"> <TextView android:id="@+id/textView" android:layout_width="0dp" android:layout_height="800dp" android:background="@color/colorAccent" android:text="@string/long_text" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" /> <Button android:id="@+id/button_fragment1" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginStart="16dp" android:layout_marginLeft="16dp" android:text="show blue" app:layout_constraintEnd_toStartOf="@+id/button_fragment2" app:layout_constraintHorizontal_bias="0.5" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@+id/textView" /> <Button android:id="@+id/button_fragment2" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_marginEnd="16dp" android:layout_marginRight="16dp" …

弊社のサイトを使用することにより、あなたは弊社のクッキーポリシーおよびプライバシーポリシーを読み、理解したものとみなされます。
Licensed under cc by-sa 3.0 with attribution required.