1. 程式人生 > >weex項目接入到Android studio中

weex項目接入到Android studio中

andro comm compiler 文件夾 rem bee command display tool

1:命令行 weex create awesome-app 生成一個weex項目 2:命令行 weex platform add android 項目加入到Android平臺成功之後再 platforms 夾中會有一個 android 文件 npm run build監視在vscode中的APP打包 npm run serve編譯到瀏覽器 WARNING: API ‘variant.getJavaCompiler()‘ is obsolete and has been replaced with ‘variant.getJavaCompileProvider()‘. It will be removed at the end of 2019. For more information, see https://d.android.com/r/tools/task-configuration-avoidance. To determine what is calling variant.getJavaCompiler(), use -Pandroid.debug.obsoleteApi=true on the command line to display a stack trace. Affected Modules: app 報這個警告在gradle文件夾下面的 build.gradle文件中的 dependencies { classpath ‘com.android.tools.build:gradle:3.1.4‘ 改為這個版本號 // classpath ‘com.android.tools.build:gradle:3.3.1‘ 本來是這個註釋掉 classpath ‘com.taobao.android:weexplugin-gradle-plugin:1.3‘ } 警告:目前使用的build工具版本26.0.2不合適。因為當前使用Gradle插件版本是3.1.1,這個版本至少需要build對應版本為27.0.3 這個的解決辦法是gradle文件夾下面的 build.gradle文件中的 subprojects { ext { compileSdkVersion=26 buildToolsVersion="28.0.3" 這裏吧版本號改了 minSdkVersion=14 appMinSdkVersion=15 targetSdkVersion=26 supportLibVersion="26.1.0" fastjsonLibVersion="1.1.46.android" } }

weex項目接入到Android studio中