android.arch.lifecycle.LifecycleOwner 5C

Cannot access android.arch.lifecycle.LifecycleOwner

在使用kotlin编写程序的时候,子fragment不会执行oncreate()等方法,在父类中的super.oncreate()等方法会出现如标题的报错,但是在activity中都是正常的。请问哪位大神有解决方法?

2个回答

图片说明

在你的build.gradle中加上implementation 'com.android.support:support-compat:27.1.1'

qq_33416236
Soul_渊虹 没用啊,Stack Overflow上的答案我试了的
一年多之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Android的LifeCycleOwner疑问??

![图片说明](https://img-ask.csdn.net/upload/202004/20/1587374410_398717.png) android新手,在用observe的时候遇到这个问题,这里需要实现lifecycleOwner接口的类,androidx.fragment.app.Fragment不是就是实现了这个借口嘛?为什么还会报这个错误呢?求解答 ``` class PlaceFragment : Fragment() { val viewModel by lazy { ViewModelProviders.of(this).get(PlaceViewModel::class.java) } private lateinit var adapter: PlaceAdapter override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { return inflater.inflate(R.layout.fragment_place, container, false) } override fun onActivityCreated(savedInstanceState: Bundle?) { super.onActivityCreated(savedInstanceState) val layoutManager = LinearLayoutManager(activity) recyclerView.layoutManager = layoutManager adapter = PlaceAdapter(this, viewModel.placeList) recyclerView.adapter = adapter searchPlaceEdit.addTextChangedListener { editable -> val content = editable.toString() if (content.isNotEmpty()) { viewModel.searchPlaces(content) } else { recyclerView.visibility = View.GONE bgImageView.visibility = View.VISIBLE viewModel.placeList.clear() adapter.notifyDataSetChanged() } } viewModel.placeLiveData.observe(this, Observer{ result -> val places = result.getOrNull() if (places != null) { recyclerView.visibility = View.VISIBLE bgImageView.visibility = View.GONE viewModel.placeList.clear() viewModel.placeList.addAll(places) adapter.notifyDataSetChanged() } else { Toast.makeText(activity, "未能查询到任何地点", Toast.LENGTH_SHORT).show() result.exceptionOrNull()?.printStackTrace() } }) } } ```

Android报错闪退NoClassDefFoundError: Failed resolution of: Landroid/arch/core/internal/FastSafeIterableMap怎么解决

&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;前天在build.gradle文件里面升级了一下依赖,结果再没有成功打开过app,不停地报错。之前在stackoverflow问了一下,说是clean -> rebuild -> restart IDE,一点用都没有。求牛人们解答一下,否则就废了。。。 LOG: ``` 04-26 09:49:45.993 13807 13807 D AndroidRuntime: Shutting down VM 04-26 09:49:45.995 13807 13807 E AndroidRuntime: FATAL EXCEPTION: main 04-26 09:49:45.995 13807 13807 E AndroidRuntime: Process: com.runze.chatkiller, PID: 13807 04-26 09:49:45.995 13807 13807 E AndroidRuntime: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/arch/core/internal/FastSafeIterableMap; 04-26 09:49:45.995 13807 13807 E AndroidRuntime: at android.arch.lifecycle.LifecycleRegistry.<init>(LifecycleRegistry.java:54) 04-26 09:49:45.995 13807 13807 E AndroidRuntime: at android.support.v4.app.SupportActivity.<init>(SupportActivity.java:47) 04-26 09:49:45.995 13807 13807 E AndroidRuntime: at android.support.v4.app.BaseFragmentActivityApi14.<init>(BaseFragmentActivityApi14.java:28) 04-26 09:49:45.995 13807 13807 E AndroidRuntime: at android.support.v4.app.BaseFragmentActivityApi16.<init>(BaseFragmentActivityApi16.java:34) 04-26 09:49:45.995 13807 13807 E AndroidRuntime: at android.support.v4.app.FragmentActivity.<init>(FragmentActivity.java:67) 04-26 09:49:45.995 13807 13807 E AndroidRuntime: at android.support.v7.app.AppCompatActivity.<init>(AppCompatActivity.java:61) 04-26 09:49:45.995 13807 13807 E AndroidRuntime: at com.runze.chatkiller.MainActivity.<init>(MainActivity.java:36) 04-26 09:49:45.995 13807 13807 E AndroidRuntime: at java.lang.Class.newInstance(Native Method) 04-26 09:49:45.995 13807 13807 E AndroidRuntime: at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:69) 04-26 09:49:45.995 13807 13807 E AndroidRuntime: at android.app.Instrumentation.newActivity(Instrumentation.java:1216) 04-26 09:49:45.995 13807 13807 E AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2864) 04-26 09:49:45.995 13807 13807 E AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3081) 04-26 09:49:45.995 13807 13807 E AndroidRuntime: at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) 04-26 09:49:45.995 13807 13807 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) 04-26 09:49:45.995 13807 13807 E AndroidRuntime: at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) 04-26 09:49:45.995 13807 13807 E AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1831) 04-26 09:49:45.995 13807 13807 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:106) 04-26 09:49:45.995 13807 13807 E AndroidRuntime: at android.os.Looper.loop(Looper.java:201) 04-26 09:49:45.995 13807 13807 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:6810) 04-26 09:49:45.995 13807 13807 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 04-26 09:49:45.995 13807 13807 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547) 04-26 09:49:45.995 13807 13807 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873) 04-26 09:49:45.995 13807 13807 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.arch.core.internal.FastSafeIterableMap" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/com.runze.chatkiller-X68L9eryR5FLHqiy61E0Lg==/base.apk"],nativeLibraryDirectories=[/data/app/com.runze.chatkiller-X68L9eryR5FLHqiy61E0Lg==/lib/arm64, /system/lib64]] 04-26 09:49:45.995 13807 13807 E AndroidRuntime: at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134) 04-26 09:49:45.995 13807 13807 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:379) 04-26 09:49:45.995 13807 13807 E AndroidRuntime: at java.lang.ClassLoader.loadClass(ClassLoader.java:312) 04-26 09:49:45.995 13807 13807 E AndroidRuntime: ... 22 more ``` build.gradle ``` apply plugin: 'com.android.application' android { compileSdkVersion 21 buildToolsVersion "21.1.0" defaultConfig { applicationId "com.runze.chatkiller" minSdkVersion 14 targetSdkVersion 21 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) implementation 'com.android.support:cardview-v7:28.0.0' implementation 'com.android.support:support-v4:25.3.1' implementation 'com.android.support:appcompat-v7:27.0.1' implementation 'com.android.support:recyclerview-v7:27.0.1' implementation 'com.android.support:design:27.0.1' } ```

android 5.1设备中运行程序编译不通过,在8.1上又能运行,求大神解惑?

09-09 17:09:28.354 14227-14227/gbpe.baidulbs D/AccessibilityManager: setStateLocked: wasEnabled = false, mIsEnabled = false, wasTouchExplorationEnabled = false, mIsTouchExplorationEnabled = false, wasHighTextContrastEnabled = false, mIsHighTextContrastEnabled = false java.lang.Throwable: setStateLocked at android.view.accessibility.AccessibilityManager.setStateLocked(AccessibilityManager.java:553) at android.view.accessibility.AccessibilityManager.tryConnectToServiceLocked(AccessibilityManager.java:636) at android.view.accessibility.AccessibilityManager.<init>(AccessibilityManager.java:226) at android.view.accessibility.AccessibilityManager.getInstance(AccessibilityManager.java:206) at android.view.View.setFlags(View.java:9843) at android.view.ViewGroup.initViewGroup(ViewGroup.java:536) at android.view.ViewGroup.<init>(ViewGroup.java:525) at android.view.ViewGroup.<init>(ViewGroup.java:520) at android.view.ViewGroup.<init>(ViewGroup.java:516) at android.view.ViewGroup.<init>(ViewGroup.java:512) at android.widget.FrameLayout.<init>(FrameLayout.java:119) at com.android.internal.policy.impl.PhoneWindow$DecorView.<init>(PhoneWindow.java:2326) at com.android.internal.policy.impl.PhoneWindow.generateDecor(PhoneWindow.java:3463) at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:3849) at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:411) at android.app.Activity.setContentView(Activity.java:2175) at gbpe.baidulbs.ShareLocationActivity.onCreate(ShareLocationActivity.java:108) at android.app.Activity.performCreate(Activity.java:6100) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1112) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2481) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2614) at android.app.ActivityThread.access$800(ActivityThread.java:178) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1470) at android.os.Handler.dispatchMessage(Handler.java:111) at android.os.Looper.loop(Looper.java:194) at android.app.ActivityThread.main(ActivityThread.java:5643) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755) 09-09 17:09:28.357 254-254/? D/Surface: Surface::setBuffersDimensions(this=0x7f9e9f4e00,w=320,h=330)

Android.mk 编译错误,出现莫名其的符号问题

我在编译android项目的时候, 在 Android.mk 中 引用 opencv for android ,![图片说明](https://img-ask.csdn.net/upload/201701/05/1483611588_480902.png) 只要加上 图片上 红框中的三行后就会报错 ![图片说明](https://img-ask.csdn.net/upload/201701/05/1483611614_182077.png) 很奇怪的错误, OpenCV.mk 莫名其妙的多了一个 “-” 导致找不到 opencv里面的 makefil但e , 如果去掉那三行就没问题了, 哪位大神遇到过这种问题, 或者有解决方法

请问要怎么样通过新activity的返回值修改gridview中各个item的内容呢?

package com.example.hasee.myapplication; import android.arch.core.internal.SafeIterableMap; import android.content.Intent; import android.support.annotation.Nullable; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.AdapterView; import android.widget.Button; import android.widget.GridView; import android.widget.ImageView; import android.widget.SimpleAdapter; import android.widget.TextView; import android.widget.Toast; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; public class MainActivity extends AppCompatActivity { GridView gridView; private int clickTemp = -1; //标识选择的Item SimpleAdapter simpleAdapter; List<Map<String,String>>list; String add_Title="",add_Context=""; Map<String,String>map; Button button; int count; final String[] name=new String[]{"语文","语文","语文","语文","语文","语文","语文","语文","语文","语文","语文","语文","语文","语文","语文","语文","语文"}; final String[] location=new String[]{"六教","六教","六教","六教","六教","六教","六教","六教","六教","六教","六教","六教","六教","六教","六教","六教","六教"}; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); gridView=findViewById(R.id.My_gridview); list=new ArrayList<>(); for(int i=0;i<name.length;i++) { map=new HashMap<>(); map.put("001",name[i]); map.put("002",location[i]); list.add(map); } simpleAdapter=new SimpleAdapter(MainActivity.this,list,R.layout.gridview_item,new String[]{"001","002"},new int[]{R.id.textView,R.id.textView2}); gridView.setAdapter(simpleAdapter); gridView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { startActivityForResult(new Intent(MainActivity.this,Main2Activity.class),0x01); count=position; } }); } @Override protected void onActivityResult(int requestCode, int resultCode, @Nullable Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == 0x01 && resultCode == 0x07) { add_Title = data.getStringExtra("003"); add_Context = data.getStringExtra("004"); name[count]=add_Title; location[count]=add_Context; Toast.makeText(MainActivity.this,name[count],Toast.LENGTH_SHORT).show(); simpleAdapter.notifyDataSetChanged(); } } }

appium测试微信公众号出现Could not find package com.android.chrome on the device的问题

1.新手,想在微信上面测试公众号,用的是appium+java,写了测试用例然后run的时候一直报错,没有找到解决方案,求大神指点,在线等!! 2.以下是我的代码: 初始化init类: ``` package appiumDemo; import java.io.File; import java.net.MalformedURLException; import java.net.URL; import java.util.concurrent.TimeUnit; import org.openqa.selenium.chrome.ChromeOptions; import org.openqa.selenium.remote.CapabilityType; import org.openqa.selenium.remote.DesiredCapabilities; import io.appium.java_client.android.AndroidDriver; public class InitAppium { public static AndroidDriver launchApp(String deviceName) throws MalformedURLException { // 设置自动化相关参数 DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability(CapabilityType.BROWSER_NAME, ""); // 使用哪种移动平台 capabilities.setCapability("platformName", "Android"); // 启动哪种设备,是真机还是模拟器 capabilities.setCapability("deviceName", deviceName); // 如果是模拟器输入Android Emulator 红米note3 db3489d // 不要再次安装apk capabilities.setCapability("noReset", true); // 不用重新签名 capabilities.setCapability("noSign", true); // 设置安卓系统版本 capabilities.setCapability("platformVersion", "7.1"); // 支持unicode键盘,输入中文设置 capabilities.setCapability("unicodeKeyboard", "True"); capabilities.setCapability("resetKeyboard", "True"); // 设置app的主包名和主类名 capabilities.setCapability("appPackage","com.tencent.mm"); capabilities.setCapability("appActivity", "com.tencent.mm.ui.LauncherUI"); ChromeOptions options = new ChromeOptions(); options.setExperimentalOption("androidProcess", "com.tencent.mm:tools"); capabilities.setCapability(ChromeOptions.CAPABILITY, options); AndroidDriver driver = new AndroidDriver(new URL("http://169.254.82.105:4723/wd/hub"), capabilities); driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS); return driver; } } ``` 测试类代码如下: ``` package appiumDemo; import java.net.MalformedURLException; import org.testng.annotations.Test; import io.appium.java_client.android.AndroidDriver; public class NewTest { private AndroidDriver driver; @SuppressWarnings("static-access") @Test public void f() { InitAppium init=new InitAppium(); try { init.launchApp("c353ce90"); } catch (MalformedURLException e) { e.printStackTrace(); } driver.findElementById("com.tencent.mm:id/azj").click(); } } ``` 3.报错信息 ``` [RemoteTestNG] failed to get TestNG version from class: java.lang.ClassNotFoundException: org.testng.internal.Version [RemoteTestNG] now trying to parse the version from pom.properties [RemoteTestNG] parsing TestNG version at jar:file:/E:/test/Tools/maven/maven-repository/org/testng/testng/6.1.1/testng-6.1.1.jar!/META-INF/maven/org.testng/testng/pom.properties [RemoteTestNG] detected TestNG version 6.1.1 [TestNG] Running: C:\Users\vanchu\AppData\Local\Temp\testng-eclipse-1879104749\testng-customsuite.xml FAILED: f org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Could not find package com.android.chrome on the device (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 9.90 seconds Build info: version: '3.8.1', revision: '6e95a6684b', time: '2017-12-01T19:05:32.194Z' System info: host: 'DESKTOP-GBO4D78', ip: '169.254.151.82', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_91' Driver info: driver.version: AndroidDriver at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:214) at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:166) at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$new$0(JsonWireProtocolResponse.java:53) at org.openqa.selenium.remote.JsonWireProtocolResponse.lambda$getResponseFunction$2(JsonWireProtocolResponse.java:91) at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:123) at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) at java.util.Spliterators$ArraySpliterator.tryAdvance(Unknown Source) at java.util.stream.ReferencePipeline.forEachWithCancel(Unknown Source) at java.util.stream.AbstractPipeline.copyIntoWithCancel(Unknown Source) at java.util.stream.AbstractPipeline.copyInto(Unknown Source) at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) at java.util.stream.FindOps$FindOp.evaluateSequential(Unknown Source) at java.util.stream.AbstractPipeline.evaluate(Unknown Source) at java.util.stream.ReferencePipeline.findFirst(Unknown Source) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:126) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:73) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:142) at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:89) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:601) at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:42) at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1) at io.appium.java_client.android.AndroidDriver.execute(AndroidDriver.java:1) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:219) at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:142) at io.appium.java_client.DefaultGenericMobileDriver.<init>(DefaultGenericMobileDriver.java:38) at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:87) at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:111) at io.appium.java_client.android.AndroidDriver.<init>(AndroidDriver.java:72) at appiumDemo.InitAppium.launchApp(InitAppium.java:54) at appiumDemo.NewTest.f(NewTest.java:16) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80) at org.testng.internal.Invoker.invokeMethod(Invoker.java:673) at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:842) at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1166) at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125) at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109) at org.testng.TestRunner.runWorkers(TestRunner.java:1178) at org.testng.TestRunner.privateRun(TestRunner.java:757) at org.testng.TestRunner.run(TestRunner.java:608) at org.testng.SuiteRunner.runTest(SuiteRunner.java:334) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291) at org.testng.SuiteRunner.run(SuiteRunner.java:240) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1158) at org.testng.TestNG.runSuitesLocally(TestNG.java:1083) at org.testng.TestNG.run(TestNG.java:999) at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:114) at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251) at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77) =============================================== Default test Tests run: 1, Failures: 1, Skips: 0 =============================================== =============================================== Default suite Total tests run: 1, Failures: 1, Skips: 0 =============================================== [TestNG] Time taken by org.testng.reporters.SuiteHTMLReporter@6e6d5e: 1485 ms [TestNG] Time taken by [TestListenerAdapter] Passed:0 Failed:0 Skipped:0]: 296 ms [TestNG] Time taken by org.testng.reporters.XMLReporter@1f256fa: 109 ms [TestNG] Time taken by org.testng.reporters.EmailableReporter@aa5eb0: 62 ms [TestNG] Time taken by org.testng.reporters.JUnitReportReporter@1ebec15: 8 ms ```

NoClassDefFoundError: Failed resolution of: Landroid/support/v4/animation/AnimatorCompatHelper;

最近想买一直报这个问题 希望有大神帮我解决一下 导致崩溃 在多种地方都会显示这个错误 也没有提示哪行带拿错了 java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/animation/AnimatorCompatHelper; at android.support.v7.widget.DefaultItemAnimator.resetAnimation(DefaultItemAnimator.java:515) at android.support.v7.widget.DefaultItemAnimator.animateAdd(DefaultItemAnimator.java:218) at android.support.v7.widget.SimpleItemAnimator.animateAppearance(SimpleItemAnimator.java:114) at android.support.v7.widget.RecyclerView.animateAppearance(RecyclerView.java:3804) at android.support.v7.widget.RecyclerView$4.processAppeared(RecyclerView.java:521) at android.support.v7.widget.ViewInfoStore.process(ViewInfoStore.java:247) at android.support.v7.widget.RecyclerView.dispatchLayoutStep3(RecyclerView.java:3653) at android.support.v7.widget.RecyclerView.dispatchLayout(RecyclerView.java:3323) at android.support.v7.widget.RecyclerView.onLayout(RecyclerView.java:3844) at android.view.View.layout(View.java:16673) at android.view.ViewGroup.layout(ViewGroup.java:5476) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1743) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1586) at android.widget.LinearLayout.onLayout(LinearLayout.java:1495) at android.view.View.layout(View.java:16673) at android.view.ViewGroup.layout(ViewGroup.java:5476) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1743) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1586) at android.widget.LinearLayout.onLayout(LinearLayout.java:1495) at android.view.View.layout(View.java:16673) at android.view.ViewGroup.layout(ViewGroup.java:5476) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1743) at android.widget.LinearLayout.layoutHorizontal(LinearLayout.java:1732) at android.widget.LinearLayout.onLayout(LinearLayout.java:1497) at android.view.View.layout(View.java:16673) at android.view.ViewGroup.layout(ViewGroup.java:5476) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336) at android.widget.FrameLayout.onLayout(FrameLayout.java:273) at android.view.View.layout(View.java:16673) at android.view.ViewGroup.layout(ViewGroup.java:5476) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1743) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1586) at android.widget.LinearLayout.onLayout(LinearLayout.java:1495) at android.view.View.layout(View.java:16673) at android.view.ViewGroup.layout(ViewGroup.java:5476) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336) at android.widget.FrameLayout.onLayout(FrameLayout.java:273) at android.view.View.layout(View.java:16673) at android.view.ViewGroup.layout(ViewGroup.java:5476) at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1743) at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1586) at android.widget.LinearLayout.onLayout(LinearLayout.java:1495) at android.view.View.layout(View.java:16673) at android.view.ViewGroup.layout(ViewGroup.java:5476) at android.widget.FrameLayout.layoutChildren(FrameLayout.java:336) at android.widget.FrameLayout.onLayout(FrameLayout.java:273) at com.android.internal.policy.PhoneWindow$DecorView.onLayout(PhoneWindow.java:2727) at android.view.View.layout(View.java:16673) at android.view.ViewGroup.layout(ViewGroup.java:5476) at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:2304) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2033) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1209) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6330) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:862) at android.view.Choreographer.doCallbacks(Choreographer.java:674) at android.view.Choreographer.doFrame(Choreographer.java:610) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:848) at android.os.Handler.handleCallback(Handler.java:739) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loo

求问红线处怎么改?我想实现图片翻页

import android.os.Bundle; import android.support.v4.view.PagerAdapter; import android.support.v4.view.ViewPager; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.TextView; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.v4.app.Fragment; import android.arch.lifecycle.Observer; import android.arch.lifecycle.ViewModelProviders; import com.example.navigationmenudemo.MainActivity; import com.example.navigationmenudemo.R; import java.util.ArrayList; import java.util.List; public class GalleryFragment extends Fragment { ViewPager vp; private List<ImageView> imagelist; int [] imageIDs = {R.drawable.one, R.drawable.two,R.drawable.three,R.drawable.four,R.drawable.five}; private PagerAdapter imageAdapter; private GalleryViewModel galleryViewModel; public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { super.onCreate(savedInstanceState); View square = inflater.inflate(R.layout.fragment_gallery, container, false); vp = square.findViewById(R.id.viewpager); imagelist = load_image(imageIDs); imageAdapter = new PagerAdapter() { @Override public int getCount() { return imagelist.size(); } @Override public boolean isViewFromObject(@NonNull View view, @NonNull Object object) { return view == object; } @NonNull @Override public Object instantiateItem(@NonNull ViewGroup container, int position) { ImageView iv = imagelist.get(position); vp.addView(iv); return iv; } @Override public void destroyItem(@NonNull ViewGroup container, int position, @NonNull Object object) { vp.removeView(imagelist.get(position)); } }; vp.setAdapter(imageAdapter); galleryViewModel = ViewModelProviders.of(this).get(GalleryViewModel.class); View root = inflater.inflate(R.layout.fragment_gallery, container, false); galleryViewModel.getText().observe(getViewLifecycleOwner(), new Observer<String>() { @Override public void onChanged(@Nullable String s) { } }); return root; } public List<ImageView> load_image(int[] images){ List<ImageView> list = new ArrayList<ImageView>(); for(int i=0; i<imageIDs.length; i++){ ImageView iv = new ImageView(this); iv.setImageResource(images[i]); list.add(iv); } return list; } } ![图片说明](https://img-ask.csdn.net/upload/202005/16/1589606208_669416.png)

Android studio 创建第一个工程的时候,一直Gradle building running

Android studio 创建第一个工程的时候,一直Gradle building running Android studio是下载的最新版,vpn下运行 一直Android buinding running中,求有经验的同行解决啊 好几天了,一直解决不了![图片](https://img-ask.csdn.net/upload/201510/15/1444867229_356350.jpg) ![图片说明](https://img-ask.csdn.net/upload/201510/15/1444921155_49150.png) ![图片说明](https://img-ask.csdn.net/upload/201510/15/1444921556_564278.png) ![图片说明](https://img-ask.csdn.net/upload/201510/15/1444922686_303604.png) ![图片说明](https://img-ask.csdn.net/upload/201510/15/1444922700_449928.png) ![图片说明](https://img-ask.csdn.net/upload/201510/15/1444922711_480047.png) ![图片说明](https://img-ask.csdn.net/upload/201510/15/1444922799_33889.png) ![图片说明](https://img-ask.csdn.net/upload/201510/15/1444922746_719159.png) CLASSPATH >> .;C:\Program Files\Java\jdk1.8.0_60\lib\tools.jar;C:\Program Files\Java\jdk1.8.0_60\lib JAVA_HOME >> C:\Program Files\Java\jdk1.8.0_60 Path >> C:\ProgramData\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Java\jdk1.8.0_60\bin;C:\Program Files\TortoiseGit\bin;C:\Program Files\Android\Android Studio\gradle\gradle-2.4\bin;C:\Program Files\Java\jdk1.8.0_60\jre\bin Windows7家庭普通版 64位操作系统

代码迁移到Androidx,打包后运行出错,怎么解决?

build配置: ```apply plugin: 'com.android.application' apply plugin: 'com.jakewharton.butterknife' android { compileSdkVersion 29 buildToolsVersion '28.0.3' defaultConfig { applicationId "com.yuyao.sl.tsyw" minSdkVersion 23 targetSdkVersion 28 } buildTypes { release { minifyEnabled false proguardFiles 'proguard-rules.txt' } /*debug { //控制debug模式下是否混淆了。 minifyEnabled false proguardFiles 'proguard-rules.txt' }*/ } packagingOptions { exclude 'META-INF/androidx.localbroadcastmanager_localbroadcastmanager.version' exclude 'META-INF/DEPENDENCIES' exclude 'META-INF/NOTICE' exclude 'META-INF/LICENSE' exclude 'META-INF/LICENSE.txt' exclude 'META-INF/NOTICE.txt' } useLibrary 'org.apache.http.legacy' compileOptions { sourceCompatibility 1.8 targetCompatibility 1.8 } } dependencies { implementation project(':library') implementation project(':androidBootstrap') //noinspection GradleCompatible implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation files('libs/android-anyc-http.jar') implementation files('libs/guice-3.0-no_aop.jar') implementation files('libs/javax.inject.jar') implementation files('libs/roboguice.jar') implementation files('libs/xUtils-2.6.14.jar') implementation 'com.google.android.gms:play-services-appindexing:9.8.0' implementation files('libs/sun.misc.BASE64Decoder.jar') implementation files('libs/universal-image-loader-1.9.3-SNAPSHOT.jar') implementation 'com.jakewharton:butterknife:10.2.1' annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.1' // 'com.jakewharton:butterknife:7.0.1' implementation files('libs/commons-logging-1.2.jar') implementation files('libs/httpclient-4.5.2.jar') implementation files('libs/httpcore-4.4.4.jar') implementation project(path: ':actionbarsherlock') } ``` 错误提示: ```Entry name 'META-INF/androidx.legacy_legacy-support-core-utils.version' collided ``` 就是打完包之后报错,clean --rebuild项目之后又能正常编译 。

树莓派中安装的sqlite数据库,通过jdbc连接失败

代码相同,在windows平台运行可以通过,在树莓派中可以编译但运行报错,是不是因为arm板的原因 代码如下: import java.sql.*; import org.sqlite.JDBC; public class Demo { public static void main(String[] args) { try { Class.forName("org.sqlite.JDBC"); Connection conn = DriverManager.getConnection("jdbc:sqlite:bmdb.db"); Statement stat = conn.createStatement(); //stat.executeUpdate( "create table table1(name varchar(64), age int);" ); // stat.executeUpdate( "insert into item values(1,'a',1,'a',1);" ); // stat.executeUpdate( "insert into item values(2,'b',2,'b',2);" ); // stat.executeUpdate( "insert into item values(3,'c',3,'c',3);" ); ResultSet rs = stat.executeQuery("select * from item;"); while (rs.next()) { System.out.print("i_name = " + rs.getString("i_name") + " "); System.out.println("age = " + rs.getString("i_id")); } rs.close(); conn.close(); } catch( Exception e ) { e.printStackTrace ( ); } } } 运行结果: java.sql.SQLException: Error opening connection at org.sqlite.core.CoreConnection.open(CoreConnection.java:140) at org.sqlite.core.CoreConnection.<init>(CoreConnection.java:66) at org.sqlite.jdbc3.JDBC3Connection.<init>(JDBC3Connection.java:21) at org.sqlite.jdbc4.JDBC4Connection.<init>(JDBC4Connection.java:23) at org.sqlite.SQLiteConnection.<init>(SQLiteConnection.java:45) at org.sqlite.JDBC.createConnection(JDBC.java:114) at org.sqlite.JDBC.connect(JDBC.java:88) at java.sql.DriverManager.getConnection(DriverManager.java:664) at java.sql.DriverManager.getConnection(DriverManager.java:270) at Demo.main(Demo.java:9) Caused by: java.lang.Exception: No native library is found for os.name=Linux and os.arch=arm at org.sqlite.SQLiteJDBCLoader.loadSQLiteNativeLibrary(SQLiteJDBCLoader.java:284) at org.sqlite.SQLiteJDBCLoader.initialize(SQLiteJDBCLoader.java:65) at org.sqlite.core.NativeDB.load(NativeDB.java:53) at org.sqlite.core.CoreConnection.open(CoreConnection.java:136) ... 9 more

Android项目运行出错,该怎么解决?

Android项目运行提示如下错误: 该怎么解决? ``` com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details ``` ![图片说明](https://img-ask.csdn.net/upload/201904/27/1556354228_630003.png)

android 内核驱动编译

android 内核编译时,编译驱动只生成.o文件,不生成.ko文件,确认驱动没有编译进内核,第一次编译的时候生成过.ko文件,以后在编译时就不生成ko文件了。 Building modules, stage 2. MODPOST 0 modules OBJCOPY arch/arm/boot/Image Kernel: arch/arm/boot/Image is ready GZIP arch/arm/boot/compressed/piggy.gzip CC arch/arm/boot/compressed/misc.o CC arch/arm/boot/compressed/decompress.o CC arch/arm/boot/compressed/string.o AS arch/arm/boot/compressed/piggy.gzip.o LD arch/arm/boot/compressed/vmlinux OBJCOPY arch/arm/boot/zImage Kernel: arch/arm/boot/zImage is ready CAT arch/arm/boot/zImage-dtb Kernel: arch/arm/boot/zImage-dtb is ready

android 源码编译出现的错误

xxxxx@compiler:~/xxxx/0313-test-1/0313/packages/xxxx/myTV$ mm -B ============================================ PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=4.4.2 TARGET_PRODUCT=m201 TARGET_BUILD_VARIANT=user TARGET_BUILD_TYPE=release TARGET_BUILD_APPS= TARGET_ARCH=arm TARGET_ARCH_VARIANT=armv7-a-neon TARGET_CPU_VARIANT=cortex-a9 HOST_ARCH=x86 HOST_OS=linux HOST_OS_EXTRA=Linux-3.2.0-86-generic-x86_64-with-Ubuntu-12.04-precise HOST_BUILD_TYPE=release BUILD_ID=KOT49H OUT_DIR=out ============================================ PRODUCT_COPY_FILES device/xxxx/m201/audio_effects.conf:system/etc/audio_effects.conf ignored. PRODUCT_COPY_FILES device/xxxx/m201/lowmemorykiller.txt:/system/etc/lowmemorykiller.txt ignored. PRODUCT_COPY_FILES device/xxxx/m201/lowmemorykiller_512M.txt:/system/etc/lowmemorykiller_512M.txt ignored. No private recovery resources for TARGET_DEVICE m201 make: Entering directory `/mnt/commondata/user/aliontuo/xxxx/0313-test-1/0313' target R.java/Manifest.java: myTV (out/target/common/obj/APPS/myTV_intermediates/src/R.stamp) Warning: AndroidManifest.xml already defines versionCode (in http://schemas.android.com/apk/res/android); using existing value in manifest. Warning: AndroidManifest.xml already defines versionName (in http://schemas.android.com/apk/res/android); using existing value in manifest. Warning: AndroidManifest.xml already defines minSdkVersion (in http://schemas.android.com/apk/res/android); using existing value in manifest. Warning: AndroidManifest.xml already defines targetSdkVersion (in http://schemas.android.com/apk/res/android); using existing value in manifest. target Prebuilt: myTV (out/target/common/obj/JAVA_LIBRARIES/libgson-2.2.4_intermediates/classes.jar) target Prebuilt: myTV (out/target/common/obj/JAVA_LIBRARIES/libgson-2.2.4_intermediates/javalib.jar) target Prebuilt: myTV (out/target/common/obj/JAVA_LIBRARIES/libotaupdate_intermediates/classes.jar) target Prebuilt: myTV (out/target/common/obj/JAVA_LIBRARIES/libotaupdate_intermediates/javalib.jar) target Prebuilt: myTV (out/target/common/obj/JAVA_LIBRARIES/libactivemq-broker-5.12.0_intermediates/classes.jar) target Prebuilt: myTV (out/target/common/obj/JAVA_LIBRARIES/libactivemq-broker-5.12.0_intermediates/javalib.jar) target Prebuilt: myTV (out/target/common/obj/JAVA_LIBRARIES/libactivemq-client-5.12.0_intermediates/classes.jar) target Prebuilt: myTV (out/target/common/obj/JAVA_LIBRARIES/libactivemq-client-5.12.0_intermediates/javalib.jar) target Prebuilt: myTV (out/target/common/obj/JAVA_LIBRARIES/libactivemq-console-5.12.0_intermediates/classes.jar) target Prebuilt: myTV (out/target/common/obj/JAVA_LIBRARIES/libactivemq-console-5.12.0_intermediates/javalib.jar) target Prebuilt: myTV (out/target/common/obj/JAVA_LIBRARIES/libactivemq-jaas-5.12.0_intermediates/classes.jar) target Prebuilt: myTV (out/target/common/obj/JAVA_LIBRARIES/libactivemq-jaas-5.12.0_intermediates/javalib.jar) target Prebuilt: myTV (out/target/common/obj/JAVA_LIBRARIES/libactivemq-kahadb-store-5.12.0_intermediates/classes.jar) target Prebuilt: myTV (out/target/common/obj/JAVA_LIBRARIES/libactivemq-kahadb-store-5.12.0_intermediates/javalib.jar) target Prebuilt: myTV (out/target/common/obj/JAVA_LIBRARIES/libactivemq-openwire-legacy-5.12.0_intermediates/classes.jar) target Prebuilt: myTV (out/target/common/obj/JAVA_LIBRARIES/libactivemq-openwire-legacy-5.12.0_intermediates/javalib.jar) target Prebuilt: myTV (out/target/common/obj/JAVA_LIBRARIES/libactivemq-protobuf-1.1_intermediates/classes.jar) target Prebuilt: myTV (out/target/common/obj/JAVA_LIBRARIES/libactivemq-protobuf-1.1_intermediates/javalib.jar) target Prebuilt: myTV (out/target/common/obj/JAVA_LIBRARIES/libactivemq-spring-5.12.0_intermediates/classes.jar) target Prebuilt: myTV (out/target/common/obj/JAVA_LIBRARIES/libactivemq-spring-5.12.0_intermediates/javalib.jar) target Prebuilt: myTV (out/target/common/obj/JAVA_LIBRARIES/libactivemq-web-5.12.0_intermediates/classes.jar) target Prebuilt: myTV (out/target/common/obj/JAVA_LIBRARIES/libactivemq-web-5.12.0_intermediates/javalib.jar) target Prebuilt: myTV (out/target/common/obj/JAVA_LIBRARIES/libgeronimo-j2ee-management_1.1_spec-1.0.1_intermediates/classes.jar) target Prebuilt: myTV (out/target/common/obj/JAVA_LIBRARIES/libgeronimo-j2ee-management_1.1_spec-1.0.1_intermediates/javalib.jar) target Prebuilt: myTV (out/target/common/obj/JAVA_LIBRARIES/libgeronimo-jms_1.1_spec-1.1.1_intermediates/classes.jar) target Prebuilt: myTV (out/target/common/obj/JAVA_LIBRARIES/libgeronimo-jms_1.1_spec-1.1.1_intermediates/javalib.jar) target Prebuilt: myTV (out/target/common/obj/JAVA_LIBRARIES/libgeronimo-jta_1.0.1B_spec-1.0.1_intermediates/classes.jar) target Prebuilt: myTV (out/target/common/obj/JAVA_LIBRARIES/libgeronimo-jta_1.0.1B_spec-1.0.1_intermediates/javalib.jar) target Prebuilt: myTV (out/target/common/obj/JAVA_LIBRARIES/libhawtbuf-1.11_intermediates/classes.jar) target Prebuilt: myTV (out/target/common/obj/JAVA_LIBRARIES/libhawtbuf-1.11_intermediates/javalib.jar) target Prebuilt: myTV (out/target/common/obj/JAVA_LIBRARIES/libjcl-over-slf4j-1.7.10_intermediates/classes.jar) target Prebuilt: myTV (out/target/common/obj/JAVA_LIBRARIES/libjcl-over-slf4j-1.7.10_intermediates/javalib.jar) target Prebuilt: myTV (out/target/common/obj/JAVA_LIBRARIES/libslf4j-api-1.7.10_intermediates/classes.jar) target Prebuilt: myTV (out/target/common/obj/JAVA_LIBRARIES/libslf4j-api-1.7.10_intermediates/javalib.jar) target Java: myTV (out/target/common/obj/APPS/myTV_intermediates/classes) Note: packages/amlogic/myTV/src/com/justek/mytv/entity/FileSelector.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. Copying: out/target/common/obj/APPS/myTV_intermediates/classes-jarjar.jar Copying: out/target/common/obj/APPS/myTV_intermediates/emma_out/lib/classes-jarjar.jar Copying: out/target/common/obj/APPS/myTV_intermediates/classes.jar Copying: out/target/common/obj/APPS/myTV_intermediates/noproguard.classes.jar target Dex: myTV trouble processing "javax/transaction/Transaction.class": Ill-advised or mistaken usage of a core class (java.* or javax.*) when not building a core library. This is often due to inadvertently including a core library file in your application's project, when using an IDE (such as Eclipse). If you are sure you're not intentionally defining a core class, then this is the most likely explanation of what's going on. However, you might actually be trying to define a class in a core namespace, the source of which you may have taken, for example, from a non-Android virtual machine project. This will most assuredly not work. At a minimum, it jeopardizes the compatibility of your app with future versions of the platform. It is also often of questionable legality. If you really intend to build a core library -- which is only appropriate as part of creating a full virtual machine distribution, as opposed to compiling an application -- then use the "--core-library" option to suppress this error message. If you go ahead and use "--core-library" but are in fact building an application, then be forewarned that your application will still fail to build or run, at some point. Please be prepared for angry customers who find, for example, that your application ceases to function once they upgrade their operating system. You will be to blame for this problem. If you are legitimately using some code that happens to be in a core package, then the easiest safe alternative you have is to repackage that code. That is, move the classes in question into your own package namespace. This means that they will never be in conflict with core system classes. JarJar is a tool that may help you in this endeavor. If you find that you cannot do this, then that is an indication that the path you are on will ultimately lead to pain, suffering, grief, and lamentation. 1 error; aborting make: *** [out/target/common/obj/APPS/myTV_intermediates/classes-with-local.dex] Error 1 make: Leaving directory `/mnt/commondata/user/aliontuo/xxxx/0313-test-1/0313' 这个是因为我引入的jar包的什么原因导致的,是否这些包有冲突? 求大神帮忙看看啊

Linux下java编译通过运行报错怎么处理?

Linux下,编译是没问题的, javac xxx.java 然后java xxx,报错了,就是找不到main。 这是因为什么? 我有朋友说是添加系统命令,但是没太理解,不知道怎么回事。 这样的问题肯定也有人遇到的,说说怎么处理呗

AOSP构建错误-制作失败

<div class="post-text" itemprop="text"> <p>When I try to run <code>mm</code>, <code>make</code> or even <code>make clobber</code> I get the error below. I have followed the instructions from Google and have searched for the issue on the Internet. I haven't found anything that helps solve my problem. Can anybody advise as to what might be the problem here? </p> <p>The source was downloaded 23/11/2016. I'm running Ubtuntu 14.04.5. I've install OpenJDK 8. I've downloaded the Nexus 6P (angler) binaries for Android (3429405) and run them from the root directory. I have make 3.81. When I run '<code>make clobber</code>' as advised <a href="https://source.android.com/source/building.html" rel="nofollow noreferrer">here</a>, it produces the error below. I've narrowed the problem down to a go file (<code>module.go</code>) but I can't see how to fix it.</p> <pre><code>x@x-VirtualBox:~/WORKING_DIRECTORY$ make clobber ============================================ PLATFORM_VERSION_CODENAME=REL PLATFORM_VERSION=7.0 TARGET_PRODUCT=aosp_arm TARGET_BUILD_VARIANT=eng TARGET_BUILD_TYPE=release TARGET_BUILD_APPS= TARGET_ARCH=arm TARGET_ARCH_VARIANT=armv7-a TARGET_CPU_VARIANT=generic TARGET_2ND_ARCH= TARGET_2ND_ARCH_VARIANT= TARGET_2ND_CPU_VARIANT= HOST_ARCH=x86_64 HOST_2ND_ARCH=x86 HOST_OS=linux HOST_OS_EXTRA=Linux-4.4.0-31-generic-x86_64-with-Ubuntu-14.04-trusty HOST_CROSS_OS=windows HOST_CROSS_ARCH=x86 HOST_CROSS_2ND_ARCH=x86_64 HOST_BUILD_TYPE=release BUILD_ID=NYC OUT_DIR=out AUX_OS_VARIANT_LIST= ============================================ ninja: no work to do. [1/27] compile out/soong/.bootstrap/soong-android/pkg/android/soong/android.a FAILED: out/soong/.bootstrap/soong-android/pkg/android/soong/android.a GOROOT='./prebuilts/go/linux-x86' ./prebuilts/go/linux-x86/pkg/tool/linux_amd64/compile -o out/soong/.bootstrap/soong-android/pkg/android/soong/android.a -p android/soong/android -complete -I out/soong/.bootstrap/blueprint-parser/pkg -I out/soong/.bootstrap/blueprint-deptools/pkg -I out/soong/.bootstrap/blueprint-pathtools/pkg -I out/soong/.bootstrap/blueprint-proptools/pkg -I out/soong/.bootstrap/blueprint/pkg -I out/soong/.bootstrap/blueprint-bootstrap-bpdoc/pkg -I out/soong/.bootstrap/blueprint-bootstrap/pkg -I out/soong/.bootstrap/soong/pkg -I out/soong/.bootstrap/soong-env/pkg -pack build/soong/android/androidmk.go build/soong/android/arch.go build/soong/android/config.go build/soong/android/defaults.go build/soong/android/defs.go build/soong/android/expand.go build/soong/android/hooks.go build/soong/android/makevars.go build/soong/android/module.go build/soong/android/mutator.go build/soong/android/onceper.go build/soong/android/package_ctx.go build/soong/android/paths.go build/soong/android/prebuilt.go build/soong/android/register.go build/soong/android/util.go build/soong/android/variable.go build/soong/android/env.go build/soong/android/module.go:526: unknown blueprint.BuildParams field 'Deps' in struct literal [2/27] compile out/soong/.bootstrap/so...g-android/test/android/soong/android.a FAILED: out/soong/.bootstrap/soong-android/test/android/soong/android.a GOROOT='./prebuilts/go/linux-x86' ./prebuilts/go/linux-x86/pkg/tool/linux_amd64/compile -o out/soong/.bootstrap/soong-android/test/android/soong/android.a -p android/soong/android -complete -I out/soong/.bootstrap/blueprint-parser/pkg -I out/soong/.bootstrap/blueprint-deptools/pkg -I out/soong/.bootstrap/blueprint-pathtools/pkg -I out/soong/.bootstrap/blueprint-proptools/pkg -I out/soong/.bootstrap/blueprint/pkg -I out/soong/.bootstrap/blueprint-bootstrap-bpdoc/pkg -I out/soong/.bootstrap/blueprint-bootstrap/pkg -I out/soong/.bootstrap/soong/pkg -I out/soong/.bootstrap/soong-env/pkg -pack build/soong/android/androidmk.go build/soong/android/arch.go build/soong/android/config.go build/soong/android/defaults.go build/soong/android/defs.go build/soong/android/expand.go build/soong/android/hooks.go build/soong/android/makevars.go build/soong/android/module.go build/soong/android/mutator.go build/soong/android/onceper.go build/soong/android/package_ctx.go build/soong/android/paths.go build/soong/android/prebuilt.go build/soong/android/register.go build/soong/android/util.go build/soong/android/variable.go build/soong/android/env.go build/soong/android/expand_test.go build/soong/android/paths_test.go build/soong/android/prebuilt_test.go build/soong/android/module.go:526: unknown blueprint.BuildParams field 'Deps' in struct literal ninja: build stopped: subcommand failed. make: *** [run_soong] Error 1 #### make failed to build some targets (1 seconds) #### </code></pre> </div>

Android Jni Ndk配置问题

在mac系统上都可以正常跑,在window上运行不了 可以编译通过,AS和jdk和gradle的版本都一样,求解决 上错误日志 Error:FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:externalNativeBuildDebug'. > Build command failed. Error while executing process D:\androidStudio\SDK\ndk-bundle\ndk-build.cmd with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=D:\chatcat\vchat_android\app\src\main\Android.mk NDK_APPLICATION_MK=D:\chatcat\vchat_android\app\src\main\Application.mk APP_ABI=armeabi-v7a NDK_ALL_ABIS=armeabi-v7a NDK_DEBUG=1 APP_PLATFORM=android-16 NDK_OUT=D:/chatcat/vchat_android/app/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=D:\chatcat\vchat_android\app\build\intermediates\ndkBuild\debug\lib NDK_APPLICATION_MK:=src/main/Application.mk D:/chatcat/vchat_android/app/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/libapm-plugin-video-preprocessing.so} [armeabi-v7a] "Compile++ thumb": "apm-plugin-video-preprocessing <= video_preprocessing_plugin_jni.cpp" process_begin: CreateProcess(NULL, D:/androidStudio/SDK/ndk-bundle/build//../toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -MMD -MP -MF D:/chatcat/vchat_android/app/build/intermediates/ndkBuild/debug/obj/local/armeabi-v7a/objs/apm-plugin-video-preprocessing/video_preprocessing_plugin_jni.o.d -gcc-toolchain D:/androidStudio/SDK/ndk-bundle/build//../toolchains/arm-linux-androideabi-4.9/prebuilt/windows-x86_64 -fpic -ffunction-sections -funwind-tables -fstack-protector-strong -Wno-invalid-command-line-argument -Wno-unused-command-line-argument -no-canonical-prefixes -fno-integrated-as -g -target armv7-none-linux-androideabi16 -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -fno-exceptions -fno-rtti -mthumb -Os -DNDEBUG -ID:/androidStudio/SDK/ndk-bundle/build//../sources/cxx-stl/stlport/stlport -ID:/androidStudio/SDK/ndk-bundle/build//../sources/cxx-stl//gabi++/include -ID:/chatcat/vchat_android/app/src/main -std=c++11 -DANDROID -D__ANDROID_API__=16 -Wa,--noexecstack -Wformat -Werror=format-security -frtti --sysroot D:/androidStudio/SDK/ndk-bundle/build//../sysroot -isystem D:/androidStudio/SDK/ndk-bundle/build

Qt for Android 如何进行调试

今天尝试使用Qt来进行Android开发,经过一系列配置后, 现在按下构建可以成功生成apk安装包,把安装包拖动到手机上可成功运行, 但是如果直接按下“运行”或“调试”按钮,就会弹出如下信息: ``` No Android arch set by the .pro file. Error while building/deploying project androidTest (kit: Android for (Clang Qt 5.14.1 for Android)) When executing step "Deploy to Android device" ``` 想请教哪位大神可以帮忙看看是怎么回事? 附上配置图片: <img src = "https://img-ask.csdn.net/upload/202004/08/1586285269_236882.jpg" width = "1032" height = "512"> <br> <img src = "https://img-ask.csdn.net/upload/202004/08/1586285287_787901.jpg" width = "877" height = "755"> <br> <img src = "https://img-ask.csdn.net/upload/202004/08/1586285676_531100.jpg" width = "940" height = "313"> <br> <img src = "https://img-ask.csdn.net/upload/202004/08/1586285718_102175.jpg" width = "642" height = "223"> <br> <img src = "https://img-ask.csdn.net/upload/202004/08/1586285819_153410.jpg" width = "657" height = "680">

Mac下编译Android FFmpeg2.2.2报错gcc is unable to create an executable file

大家好。报错如题。查看config.log里面有错: EGIN /var/folders/ch/3lnns2f14bv398_ghdz1v9_h0000gn/T//ffconf.nj0OFFb3.c 1 #include <stddef.h> 2 #if !(defined __ARM_ARCH_4__ || defined __TARGET_ARCH_4) 3 #error "unsatisfied condition: defined __ARM_ARCH_4__ || defined __TARGET_ARCH_4" 4 #endif END /var/folders/ch/3lnns2f14bv398_ghdz1v9_h0000gn/T//ffconf.nj0OFFb3.c 有很多都是类似的,还有比如 #error "unsatisfied condition: defined __ARM_ARCH_4T__ || defined __TARGET_ARCH_4T" #error "unsatisfied condition: defined __ARM_ARCH_5__ || defined __TARGET_ARCH_5" 这种。 我的config.sh如下: #!/bin/bash export PREBUILT=/Users/AAA/Documents/Development/Android/Environment/android-ndk-r9d/toolchains/arm-linux-androideabi-4.8/prebuilt/darwin-x86_64 export PLATFORM=/Users/AAA/Documents/Development/Android/Environment/android-ndk-r9d/platforms/android-9/arch-arm ./configure --target-os=linux \ --arch=arm \ --enable-version3 \ --enable-gpl \ --enable-nonfree \ --disable-stripping \ --disable-ffmpeg \ --disable-ffplay \ --disable-ffserver \ --disable-ffprobe \ --disable-symver \ --enable-encoders \ --enable-decoders \ --enable-muxers \ --disable-devices \ --disable-protocols \ --enable-protocol=file \ --enable-avfilter \ --enable-network \ --enable-avdevice \ --disable-asm \ --enable-cross-compile \ --enable-runtime-cpudetect \ --sysroot=$PLATFORM \ --disable-everything \ --disable-doc \ --enable-avresample \ --enable-demuxer=rtsp \ --enable-muxer=rtsp \ --enable-protocol=rtp \ --enable-hwaccels \ --enable-zlib \ --prefix=$PLATFORM/usr \ --cc=$PREBUILT/bin/arm-linux-androideabi-gcc \ --cross-prefix=$PREBUILT/bin/arm-linux-androideabi- \ --nm=$PREBUILT/bin/arm-linux-androideabi-nm \ --extra-cflags="-I$PLATFORM/usr/include -fPIC -DANDROID -D__thumb__ -mthumb -Wfatal-errors -Wno-deprecated -mfloat-abi=softfp -mfpu=vfpv3-d16 -marm -march=armv7-a" \ --disable-asm \ --enable-neon \ --enable-armv5te \ --extra-ldflags="-Wl,-T,$PREBUILT/arm-linux-androideabi/lib/ldscripts/armelf_linux_eabi.x -Wl,-rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -nostdlib $PLATFORM/usr/lib/crtbegin_dynamic.o $PLATFORM/usr/lib/crtend_android.o -lc -lm -ldl" 谢谢大家了。

大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了

大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...

在中国程序员是青春饭吗?

今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

Java基础知识面试题(2020最新版)

文章目录Java概述何为编程什么是Javajdk1.5之后的三大版本JVM、JRE和JDK的关系什么是跨平台性?原理是什么Java语言有哪些特点什么是字节码?采用字节码的最大好处是什么什么是Java程序的主类?应用程序和小程序的主类有何不同?Java应用程序与小程序之间有那些差别?Java和C++的区别Oracle JDK 和 OpenJDK 的对比基础语法数据类型Java有哪些数据类型switc...

我以为我学懂了数据结构,直到看了这个导图才发现,我错了

数据结构与算法思维导图

String s = new String(" a ") 到底产生几个对象?

老生常谈的一个梗,到2020了还在争论,你们一天天的,哎哎哎,我不是针对你一个,我是说在座的各位都是人才! 上图红色的这3个箭头,对于通过new产生一个字符串(”宜春”)时,会先去常量池中查找是否已经有了”宜春”对象,如果没有则在常量池中创建一个此字符串对象,然后堆中再创建一个常量池中此”宜春”对象的拷贝对象。 也就是说准确答案是产生了一个或两个对象,如果常量池中原来没有 ”宜春” ,就是两个。...

技术大佬:我去,你写的 switch 语句也太老土了吧

昨天早上通过远程的方式 review 了两名新来同事的代码,大部分代码都写得很漂亮,严谨的同时注释也很到位,这令我非常满意。但当我看到他们当中有一个人写的 switch 语句时,还是忍不住破口大骂:“我擦,小王,你丫写的 switch 语句也太老土了吧!” 来看看小王写的代码吧,看完不要骂我装逼啊。 private static String createPlayer(PlayerTypes p...

Linux面试题(2020最新版)

文章目录Linux 概述什么是LinuxUnix和Linux有什么区别?什么是 Linux 内核?Linux的基本组件是什么?Linux 的体系结构BASH和DOS之间的基本区别是什么?Linux 开机启动过程?Linux系统缺省的运行级别?Linux 使用的进程间通信方式?Linux 有哪些系统日志文件?Linux系统安装多个桌面环境有帮助吗?什么是交换空间?什么是root帐户什么是LILO?什...

Linux命令学习神器!命令看不懂直接给你解释!

大家都知道,Linux 系统有非常多的命令,而且每个命令又有非常多的用法,想要全部记住所有命令的所有用法,恐怕是一件不可能完成的任务。 一般情况下,我们学习一个命令时,要么直接百度去搜索它的用法,要么就直接用 man 命令去查看守冗长的帮助手册。这两个都可以实现我们的目标,但有没有更简便的方式呢? 答案是必须有的!今天给大家推荐一款有趣而实用学习神器 — kmdr,让你解锁 Linux 学习新姿势...

和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...

史上最全的 python 基础知识汇总篇,没有比这再全面的了,建议收藏

网友们有福了,小编终于把基础篇的内容全部涉略了一遍,这是一篇关于基础知识的汇总的文章,请朋友们收下,不用客气,不过文章篇幅肯能会有点长,耐心阅读吧爬虫(七十)多进程multiproces...

讲一个程序员如何副业月赚三万的真实故事

loonggg读完需要3分钟速读仅需 1 分钟大家好,我是你们的校长。我之前讲过,这年头,只要肯动脑,肯行动,程序员凭借自己的技术,赚钱的方式还是有很多种的。仅仅靠在公司出卖自己的劳动时...

女程序员,为什么比男程序员少???

昨天看到一档综艺节目,讨论了两个话题:(1)中国学生的数学成绩,平均下来看,会比国外好?为什么?(2)男生的数学成绩,平均下来看,会比女生好?为什么?同时,我又联想到了一个技术圈经常讨...

85后蒋凡:28岁实现财务自由、34岁成为阿里万亿电商帝国双掌门,他的人生底层逻辑是什么?...

蒋凡是何许人也? 2017年12月27日,在入职4年时间里,蒋凡开挂般坐上了淘宝总裁位置。 为此,时任阿里CEO张勇在任命书中力赞: 蒋凡加入阿里,始终保持创业者的冲劲,有敏锐的...

总结了 150 余个神奇网站,你不来瞅瞅吗?

原博客再更新,可能就没了,之后将持续更新本篇博客。

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

MySQL数据库面试题(2020最新版)

文章目录数据库基础知识为什么要使用数据库什么是SQL?什么是MySQL?数据库三大范式是什么mysql有关权限的表都有哪几个MySQL的binlog有有几种录入格式?分别有什么区别?数据类型mysql有哪些数据类型引擎MySQL存储引擎MyISAM与InnoDB区别MyISAM索引与InnoDB索引的区别?InnoDB引擎的4大特性存储引擎选择索引什么是索引?索引有哪些优缺点?索引使用场景(重点)...

新一代神器STM32CubeMonitor介绍、下载、安装和使用教程

关注、星标公众号,不错过精彩内容作者:黄工公众号:strongerHuang最近ST官网悄悄新上线了一款比较强大的工具:STM32CubeMonitor V1.0.0。经过我研究和使用之...

如果你是老板,你会不会踢了这样的员工?

有个好朋友ZS,是技术总监,昨天问我:“有一个老下属,跟了我很多年,做事勤勤恳恳,主动性也很好。但随着公司的发展,他的进步速度,跟不上团队的步伐了,有点...

我入职阿里后,才知道原来简历这么写

私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...

大学一路走来,学习互联网全靠这几个网站,最终拿下了一把offer

大佬原来都是这样炼成的

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...

为什么你不想学习?只想玩?人是如何一步一步废掉的

不知道是不是只有我这样子,还是你们也有过类似的经历。 上学的时候总有很多光辉历史,学年名列前茅,或者单科目大佬,但是虽然慢慢地长大了,你开始懈怠了,开始废掉了。。。 什么?你说不知道具体的情况是怎么样的? 我来告诉你: 你常常潜意识里或者心理觉得,自己真正的生活或者奋斗还没有开始。总是幻想着自己还拥有大把时间,还有无限的可能,自己还能逆风翻盘,只不是自己还没开始罢了,自己以后肯定会变得特别厉害...

什么时候跳槽,为什么离职,你想好了么?

都是出来打工的,多为自己着想

为什么程序员做外包会被瞧不起?

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中xx,但待遇感觉挺低,马上要报到,挺纠结的。

当HR压你价,说你只值7K,你该怎么回答?

当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...

面试阿里p7,被按在地上摩擦,鬼知道我经历了什么?

面试阿里p7被问到的问题(当时我只知道第一个):@Conditional是做什么的?@Conditional多个条件是什么逻辑关系?条件判断在什么时候执...

你期望月薪4万,出门右拐,不送,这几个点,你也就是个初级的水平

先来看几个问题通过注解的方式注入依赖对象,介绍一下你知道的几种方式@Autowired和@Resource有何区别说一下@Autowired查找候选者的...

面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?

最近面试了一个31岁8年经验的程序猿,让我有点感慨,大龄程序猿该何去何从。

大三实习生,字节跳动面经分享,已拿Offer

说实话,自己的算法,我一个不会,太难了吧

程序员垃圾简历长什么样?

已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...

立即提问
相关内容推荐