0-a-e / Pingheng

Misskey client for Android created with React Native.
https://0-a-e.github.io/Pingheng/
MIT License
21 stars 3 forks source link

Build instructions #1

Open ThatOneCalculator opened 2 years ago

ThatOneCalculator commented 2 years ago

Since there's no CI/CD, I'm trying to build this for Android. I tried yarn && cd android && ./gradlew build but I got this error:


Pingheng/android on  main [!?] via ⬡ v6.8.1 via ☕️ v18.0.1 took 2m 38s   ./gradlew build

FAILURE: Build failed with an exception.

* What went wrong:
Could not open settings generic class cache for settings file '/tmp/Pingheng/android/settings.gradle' (/home/kainoa/.gradle/caches/6.8.1/scripts/1bfupmzwgy7qkuznn6rqpo6ai).
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 62

* 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 280ms
ThatOneCalculator commented 1 year ago

@0-a-e ?

ThatOneCalculator commented 1 year ago

Trying to build again, I get this error:

➜  pingheng git:(new) ✗ npx react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res
                    Welcome to Metro!
              Fast - Scalable - Integrated

error Unable to resolve module ./tabPages/bottomSheet/BottomSheet from /tmp/pingheng/pages/Main.tsx: 

None of these files exist:
  * pages/tabPages/bottomSheet/BottomSheet(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
  * pages/tabPages/bottomSheet/BottomSheet/index(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
  2 | import {DarkTheme, NavigationContainer, useNavigation} from '@react-navigation/native';
  3 | import {createNativeStackNavigator} from '@react-navigation/native-stack';
> 4 | import BottomSheet from './tabPages/bottomSheet/BottomSheet';
    |                          ^
  5 | import NotifyScreen from './tabPages/notify/Notify';
  6 | import TimelineScreen from './tabPages/timeline/Timeline';
  7 | import UserScreen from './tabPages/user/User';.
Error: Unable to resolve module ./tabPages/bottomSheet/BottomSheet from /tmp/pingheng/pages/Main.tsx: 

None of these files exist:
  * pages/tabPages/bottomSheet/BottomSheet(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
  * pages/tabPages/bottomSheet/BottomSheet/index(.native|.android.js|.native.js|.js|.android.json|.native.json|.json|.android.ts|.native.ts|.ts|.android.tsx|.native.tsx|.tsx)
  2 | import {DarkTheme, NavigationContainer, useNavigation} from '@react-navigation/native';
  3 | import {createNativeStackNavigator} from '@react-navigation/native-stack';
> 4 | import BottomSheet from './tabPages/bottomSheet/BottomSheet';
    |                          ^
  5 | import NotifyScreen from './tabPages/notify/Notify';
  6 | import TimelineScreen from './tabPages/timeline/Timeline';
  7 | import UserScreen from './tabPages/user/User';
    at ModuleResolver.resolveDependency (/tmp/pingheng/node_modules/metro/src/node-haste/DependencyGraph/ModuleResolution.js:136:15)
    at DependencyGraph.resolveDependency (/tmp/pingheng/node_modules/metro/src/node-haste/DependencyGraph.js:231:43)
    at Object.resolve (/tmp/pingheng/node_modules/metro/src/lib/transformHelpers.js:129:24)
    at resolve (/tmp/pingheng/node_modules/metro/src/DeltaBundler/traverseDependencies.js:396:33)
    at /tmp/pingheng/node_modules/metro/src/DeltaBundler/traverseDependencies.js:412:26
    at Array.reduce (<anonymous>)
    at resolveDependencies (/tmp/pingheng/node_modules/metro/src/DeltaBundler/traverseDependencies.js:411:33)
    at processModule (/tmp/pingheng/node_modules/metro/src/DeltaBundler/traverseDependencies.js:140:31)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async addDependency (/tmp/pingheng/node_modules/metro/src/DeltaBundler/traverseDependencies.js:230:18)
info Run CLI with --verbose flag for more details.
0-a-e commented 1 year ago

Sorry for the delay in confirming. Thank you for your contribution!

0-a-e commented 1 year ago

I will check the commits and merge them later.