質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.46%
React Native

React Nativeは、ネイティブモバイルアプリ(iOS/Android)を作成できるJavaScriptフレームワークです。Reactと同じ設計のため、宣言的なコンポーネントでリッチなUIを開発することが可能です。

Android

Androidは、Google社が開発したスマートフォンやタブレットなど携帯端末向けのプラットフォームです。 カーネル・ミドルウェア・ユーザーインターフェイス・ウェブブラウザ・電話帳などのアプリケーションやソフトウェアをひとつにまとめて構成。 カーネル・ライブラリ・ランタイムはほとんどがC言語/C++、アプリケーションなどはJavaSEのサブセットとAndroid環境で書かれています。

Gradle

Gradleは、ビルド自動化ツールです。 ソフトウェアパッケージやドキュメント、 または実際に何か他の種類のプロジェクトの構築、テスト、公開、展開などを自動化が出来ます

Android Studio

Android Studioは、 Google社によって開発された、 Androidのネイティブアプリケーション開発に特化した統合開発ツールです。

Q&A

0回答

1637閲覧

Android Studioで既存のreact nativeアプリをnpx react-native run-androidで実行し、エミュレーターで確認出来るようにしたい

unionbiz

総合スコア32

React Native

React Nativeは、ネイティブモバイルアプリ(iOS/Android)を作成できるJavaScriptフレームワークです。Reactと同じ設計のため、宣言的なコンポーネントでリッチなUIを開発することが可能です。

Android

Androidは、Google社が開発したスマートフォンやタブレットなど携帯端末向けのプラットフォームです。 カーネル・ミドルウェア・ユーザーインターフェイス・ウェブブラウザ・電話帳などのアプリケーションやソフトウェアをひとつにまとめて構成。 カーネル・ライブラリ・ランタイムはほとんどがC言語/C++、アプリケーションなどはJavaSEのサブセットとAndroid環境で書かれています。

Gradle

Gradleは、ビルド自動化ツールです。 ソフトウェアパッケージやドキュメント、 または実際に何か他の種類のプロジェクトの構築、テスト、公開、展開などを自動化が出来ます

Android Studio

Android Studioは、 Google社によって開発された、 Androidのネイティブアプリケーション開発に特化した統合開発ツールです。

0グッド

0クリップ

投稿2021/11/03 08:22

編集2021/11/03 08:25

前提・実現したいこと

ここに質問の内容を詳しく書いてください。
GitHubからダウンロードした既存のアプリをAndroid Studioを使い、エミュレーターで確認したいのですが、
エラーが発生して上手く起動できません。

発生している問題・エラーメッセージ

> Configure project :app Please create release.properties in project root. FAILURE: Build failed with an exception. * Where: Build file '/Users/ユーザー/master09/android/app/build.gradle' line: 166 * What went wrong: A problem occurred evaluating project ':app'. > path may not be null or empty string. path='null' * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 1m 47s error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details. Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * Where: Build file '/Users/ユーザー/master09/android/app/build.gradle' line: 166 * What went wrong: A problem occurred evaluating project ':app'. > path may not be null or empty string. path='null' * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 1m 47s at checkExecSyncError (child_process.js:616:11) at execFileSync (child_process.js:634:15) at runOnAllDevices (/Users/ユーザー/master09/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:94:39) at buildAndRun (/Users/ユーザー/master09/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js:158:41) at /Users/ユーザー/master09/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js:125:12 at processTicksAndRejections (internal/process/task_queues.js:93:5) at async Command.handleAction (/Users/ユーザー/master09/node_modules/react-native/node_modules/@react-native-community/cli/build/index.js:164:9)

該当のソースコード

       signingConfigs { debug { storeFile file('debug.keystore') storePassword 'android' keyAlias 'androiddebugkey' keyPassword 'android' } release { storeFile rootProject.file(props.storeFile) storePassword props.storePassword keyAlias props.keyAlias keyPassword props.keyPassword } } buildTypes { debug { signingConfig signingConfigs.debug } release { signingConfig signingConfigs.release minifyEnabled enableProguardInReleaseBuilds proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro" } }

試したこと

該当のソースコードをコメントアウトし、再度run android

* What went wrong: Execution failed for task ':app:processDebugResources'. > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade > Android resource linking failed /Users/ユーザー/.gradle/caches/transforms-2/files-2.1/2bd0ba19105b3b3df0d9bb3223076eba/core-1.7.0/res/values/values.xml:105:5-114:25: AAPT: error: resource android:attr/lStar not found.

AndroidManifest.xmlが悪さしてるのかと思い確認したところ

<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.dopingapp"> <uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.RECORD_AUDIO"/> <uses-permission android:name="android.permission.CAMERA" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <application android:name=".**MainApplication**" android:label="@string/app_name" **android:icon**="@mipmap/ic_launcher" **android:roundIcon**="@mipmap/ic_launcher_round" **android:allowBackup**="false" **android:theme**="@style/AppTheme" **android:usesCleartextTraffic**="true" **android:resizeableActivity**="false" > <activity android:name=".**MainActivity**" android:label="@string/app_name" **android:configChanges**="keyboard|keyboardHidden|screenSize" **android:screenOrientation**="portrait" **android:windowSoftInputMode**="adjustPan"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <activity android:name="**com.facebook.react.devsupport.DevSettingsActivity**" /> </application> </manifest>

「**」で囲んだ部分でエラーが発生していました。
此処まで来ると記事も少なく、解決方法が分かりません。
お知恵を貸していただけると幸いです。

補足情報(FW/ツールのバージョンなど)

node v14.15.1
watchman 2021.10.18.00
JDK adoptopenjdk8
com.android.tools.build:gradle:3.5.1
distributionUrl=https://services.gradle.org/distributions/gradle-5.5-all.zip

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

まだ回答がついていません

会員登録して回答してみよう

アカウントをお持ちの方は

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.46%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問