React Nativeのビルドでcom.atlassian.mobile.video:okhttp-ws-compat:3.7.0-atlassian1が無いって怒られる

React Nativeのビルドでcom.atlassian.mobile.video:okhttp-ws-compat:3.7.0-atlassian1が無いって怒られる

React Nativeのビルドでcom.atlassian.mobile.video:okhttp-ws-compat:3.7.0-atlassian1が無いって怒られる

数日ぶりにgradleでコンパイルを実行すると、以下のようなエラーが起こるようになった。プロジェクトには何も変更を加えていない。

<span id="395f" class="pn po io pj b gz pp pq m pr ps">FAILURE: Build failed with an exception.</span><span id="ff4e" class="pn po io pj b gz pt pq m pr ps">* What went wrong:<br></br>A problem occurred configuring project ':app'.<br></br>> A problem occurred configuring project ':react-native-sqlite-2'.<br></br> > Could not resolve all dependencies for configuration ':react-native-sqlite-2:_debugCompile'.<br></br> > Could not find com.atlassian.mobile.video:okhttp-ws-compat:3.7.0-atlassian1.<br></br> Searched in the following locations:<br></br> file:/Users/nora/.m2/repository/com/atlassian/mobile/video/okhttp-ws-compat/3.7.0-atlassian1/okhttp-ws-compat-3.7.0-atlassian1.pom<br></br> file:/Users/nora/.m2/repository/com/atlassian/mobile/video/okhttp-ws-compat/3.7.0-atlassian1/okhttp-ws-compat-3.7.0-atlassian1.jar<br></br> <a class="ag hb" href="https://jcenter.bintray.com/com/atlassian/mobile/video/okhttp-ws-compat/3.7.0-atlassian1/okhttp-ws-compat-3.7.0-atlassian1.pom" rel="noopener ugc nofollow" target="_blank">https://jcenter.bintray.com/com/atlassian/mobile/video/okhttp-ws-compat/3.7.0-atlassian1/okhttp-ws-compat-3.7.0-atlassian1.pom</a><br></br> <a class="ag hb" href="https://jcenter.bintray.com/com/atlassian/mobile/video/okhttp-ws-compat/3.7.0-atlassian1/okhttp-ws-compat-3.7.0-atlassian1.jar" rel="noopener ugc nofollow" target="_blank">https://jcenter.bintray.com/com/atlassian/mobile/video/okhttp-ws-compat/3.7.0-atlassian1/okhttp-ws-compat-3.7.0-atlassian1.jar</a><br></br> file:/Users/nora/Developments/local/pkpk/inkdrop/inkdrop-mobile/node_modules/react-native/android/com/atla<br></br>ssian/mobile/video/okhttp-ws-compat/3.7.0-atlassian1/okhttp-ws-compat-3.7.0-atlassian1.pom<br></br> file:/Users/nora/Developments/local/pkpk/inkdrop/inkdrop-mobile/node_modules/react-native/android/com/atlassian/mobile/video/okhttp-ws-compat/3.7.0-atlassian1/okhttp-ws-compat-3.7.0-atlassian1.jar<br></br> <a class="ag hb" href="https://repo1.maven.org/maven2/com/atlassian/mobile/video/okhttp-ws-compat/3.7.0-atlassian1/okhttp-ws-compat-3.7.0-atlassian1.pom" rel="noopener ugc nofollow" target="_blank">https://repo1.maven.org/maven2/com/atlassian/mobile/video/okhttp-ws-compat/3.7.0-atlassian1/okhttp-ws-compat-3.7.0-atlassian1.pom</a><br></br> <a class="ag hb" href="https://repo1.maven.org/maven2/com/atlassian/mobile/video/okhttp-ws-compat/3.7.0-atlassian1/okhttp-ws-compat-3.7.0-atlassian1.jar" rel="noopener ugc nofollow" target="_blank">https://repo1.maven.org/maven2/com/atlassian/mobile/video/okhttp-ws-compat/3.7.0-atlassian1/okhttp-ws-compat-3.7.0-atlassian1.jar</a><br></br> file:/Users/nora/Library/Android/sdk/extras/android/m2repository/com/atlassian/mobile/video/okhttp-ws-compat/3.7.0-atlassian1/okhttp-ws-compat-3.7.0-atlassian1.pom<br></br> file:/Users/nora/Library/Android/sdk/extras/android/m2repository/com/atlassian/mobile/video/okhttp-ws-compat/3.7.0-atlassian1/okhttp-ws-compat-3.7.0-atlassian1.jar<br></br> file:/Users/nora/Library/Android/sdk/extras/google/m2repository/com/atlassian/mobile/video/okhttp-ws-compat/3.7.0-atlassian1/okhttp-ws-compat-3.7.0-atlassian1.pom<br></br> file:/Users/nora/Library/Android/sdk/extras/google/m2repository/com/atlassian/mobile/video/okhttp-ws-compat/3.7.0-atlassian1/okhttp-ws-compat-3.7.0-atlassian1.jar<br></br> Required by:<br></br> inkdrop:react-native-sqlite-2:unspecified > com.facebook.react:react-native:0.42.3-atlassian-1</span><span id="efb1" class="pn po io pj b gz pt pq m pr ps">* Try:<br></br>Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.</span>

調べてみると、どうやら二日前から他の人にも発生する問題のようだ:

この問題は、モジュールに以下の依存の記述がある場合に発生するらしい:

<span id="4774" class="pn po io pj b gz pp pq m pr ps">compile 'com.facebook.react:react-native:+'</span>

このissueを読み進めていくと解決方法が提示されていた。 android/build.gradle に以下のような設定を追記すればよい。

<span id="4cfe" class="pn po io pj b gz pp pq m pr ps">allprojects {<br></br> configurations.all {<br></br> resolutionStrategy {<br></br> eachDependency { DependencyResolveDetails details -><br></br> if (details.requested.group == 'com.facebook.react' && details.requested.name == 'react-native') {<br></br> def file = new File("$rootDir/../node_modules/react-native/package.json")<br></br> def version = new groovy.json.JsonSlurper().parseText(file.text).version<br></br> details.useVersion version<br></br> }<br></br> }<br></br> }<br></br> }<br></br>}</span>

この設定によって、全ての依存モジュールが同じreact nativeのバージョンを使うように強制する。

これで自分の環境では解決した。

Read more

過集中を避けるための働き方とルーティン(二児の父ver.)

過集中を避けるための働き方とルーティン(二児の父ver.)

どうもTAKUYAです。 先日書いた通り、最近個人開発を頑張りすぎて体を壊してしまいました。 その原因の一つが過集中癖です。自分はもともと何かに集中すると周りが見えなくなる傾向があり、それがたまに私生活にも影響を及ぼします。同じ失敗を繰り返さないためにも、ちょっと働き方を再設計したいと思います。 働き方に対して他人の指摘をアテにしない 自分のようなフリーランサーまたは自作サービスで生計を立てている人は、時間の使い方を自分で自由に決められます。その反面、どこまでも極端な働き方が出来てしまい、それを指摘したり止めてくれる人がいないという欠点もあります。自分には妻がいますが、全く違う業界なので自分の作業ペースがどのようなものか具体的に把握できません。 「疲れた!」と言えば「休んだら?」と言ってくれますが、働き方やペース配分などにまで口は出しません。なので、他人のストップサインはアテに出来ません。 (心理カウンセラーの可能性を別途検討中) 最近子供が生まれたので厳密なルーティン実行は出来ない 一日を時間単位・分単位で区切ってルーティンを組むのは気持ちがいいですよね。僕もそうしたい

By Takuya Matsuyama
なぜ体を壊してまで個人開発を頑張るのか?自尊心の欠如や過集中癖と向き合う

なぜ体を壊してまで個人開発を頑張るのか?自尊心の欠如や過集中癖と向き合う

どうもTAKUYAです。最近、個人開発を頑張りすぎて体調を崩してしまいました。アトピーが猛烈に悪化して、QoLが著しく下がってしまいました。まだ療養中ですが、毎日1万歩以上歩いて、徐々に回復しつつあります。 この過ちを繰り返さないためにも、自分は一体何が原因で頑張りすぎてしまうのか?という事について深堀りして考えてみたいと思います。また、個人開発におけるメンタルヘルスはあまり語られていないトピックだと思います。本記事が、同じように仕事を頑張りすぎてしまう人の助けになれば幸いです。 TL;DR * なんとなく続けていたソフト開発が自分を救った * 原体験が歪んだモチベーションを生んでしまった * 親が引くほどの過集中癖がある * 生得的な直せないバグと考えることにする * アプリの成功に関係なく、自分をあるがままに受け入れる * 挫折しないのは、なんだかんだで前向きだから * ユーザさんから「休め!」と叱咤された * 人生は長い。個人開発なんかで死ぬな 自己の原体験について振り返ってみる 個人開発だけで生活するようになって、かれこれ8年ぐらいが経ちます。こう

By Takuya Matsuyama
ユーザサポートの問い合わせを装った攻撃が怖すぎた

ユーザサポートの問い合わせを装った攻撃が怖すぎた

どうもTAKUYAです。個人開発をしていてアプリの知名度が上がってくると、作者個人(あるいはサイト管理人)を狙った攻撃というのをたまに受けます。つい先日も、怖すぎるメールを受け取ったのでシェアします。 件名: Cookie consent prevents platform access Hello, I cannot access use the store. The cookie consent notice keeps appearing and nothing happens once I approve or try to close it, so I’m unable to interact with the website. Please provide guidance on

By Takuya Matsuyama
万年ペーパーの自分が車の運転を楽しめるようになった理由

万年ペーパーの自分が車の運転を楽しめるようになった理由

どうもTAKUYAです。大学の入学前に免許を取って以来ずっとペーパードライバーで、都市生活では出来る限り運転は避ける生活を送っていた。事故を起こせば人を◯してしまう可能性もある代物を日常的に運転するなんて考えられなかった。 そんな自分に転機が訪れたのは、結婚して大阪に戻った事と、子供ができた事、そしてアウトドアに興味を持った事だ。大阪近辺だと箕面とか野勢、神戸、丹波篠山などが日帰りでドライブしやすい距離だ。それで、恐る恐るタイムズのカーシェアで時々ではあるが運転するようになった。 他の車も生きた人間が運転しているという驚き まず運転していて気づいたのは、他の車にも生きた人間が運転していると言う点だ。そんなのは当たり前だろと思うかもしれないが、結構新鮮な発見だった。Grand Theft Autoなどの現代をモチーフにしたゲームをプレイすれば分かるが、NPCの車の動きは鈍臭いのでガンガンぶつかる。プレイヤーの進行を予測した動きなどしないからだ。 しかし現実では相手も事故りたくないので、お互いに動きを読み合い、譲り合って運転する。ルードな運転手もたまにいるものの、どちらかがよっぽ

By Takuya Matsuyama